# February of Fortran

## What is Fortran?

Fortran is a 63 y.o. programming language developed by IBM for scientific and engineering applications. Its name is an acronym from FORmula TRANslation, and still being in use for that purpose.

It’s a general-purpose programming language, but best suited for computationally intensive areas like computational physics, computational chemistry, high-performance computing and so.

Many programming languages were based on or influenced by, Fortran. And it has received many updates among the years, last one in 2018.

It was originally conceived as FORTRAN, all uppercase, in 1956. 5 updates later, in the 90s, it became Fortran. The update also added many other changes like free-form source, inline comments, modules, recursive procedures, dynamic memory allocation and many other changes that make the language modern-er.

## How to Compile and Run a Fortran Program

Let’s say you want to compile and run your first Fortran program, like this one:

program HelloWorld
implicit none
print*, "hello world"
write(*,*) "hello world"
end program

! it should return:
! hello world
! hello world


Well, you should make a series of things:

• Install gfortran, which is a Fortran compiler.
• Save your code with .f90 extension (even if you are writing in Fortran 2015, .f90 it’s the standard file extension).
• Compile with gfortran.
• Run your program as you would run any C program.

And that’s how you do it!

## What is Fortran Used For

Fortran is still in use in HPC (High Performace Computing). All that is mathematical chunk is probably done with Fortran. It’s widely used in scientific computing from Chemistry and Physics to Astronomy and Mathematics.

I can almost hear the masses… why not Python?

In fact, you can use Python in those areas. But even if Python is a better choice in many cases, you wouldn’t use it in HPC, since Fortran is performant-er. It may take more time to write, but sometimes code performance means everything.

You know, even that Python has evolved, wasn’t born exclusively for Physicists and Mathematicians.