What is Fortran

Model world

Fortran is a programming language commonly used in Science and Engineering. Its name stands for FORmula TRANslation system.

It is especially suited for numerical calculations. Its strength lies in its performance due to a low level – compiled language (C/C++) with the easiness of dealing with array/matrices (such as Python numpy). It is also due to legacy reasons it is still used.

Find more details at the wiki.

Your first program

This small guide assume you have all the required tools to compile (gfortran) and execute Fortran code on a Linux machine (Ubuntu).

Create a new file named main.f90

program main
  implicit none
  write(*,*) "hi!"
end program

Then compile it as:

gfortran main.f90 -o main 

Run it as:

:~/tests/firstprogram$ ./main
hi!

Welcome to a new programming language! 🙂