FORmula TRANslation
Developed at IBM (John Backus)
Development cycle: Write, compile, link, execute, test/debug, change
Before 90, it required a fix format (historically due to the use of punch cards)
Program units
Program units may contain internal functions and subroutines.
Variables are typed (nowadays)
integer :: valuereal :: valuecomplex :: valuecharacter*20 :: value value = 'abcd'logical :: err err = .false.Arrays: integer :: a dimension a(10)
real :: a(10, 10, 10)Constants (parameter statement)
PARAMETER (MAX=20)integer, parameter :: max=20Control statements
Implicit typing: If variable is not declared when used, then it is created at compile time based on first character. Starting from 77, implicit none can be used to require explicit typing (good practice).
subroutine mult(x,y,result)
[...]
end call mult(2,3,result)
! result contains 6 function mult(x,y)
[...]
end result = mult(2,3)
! result contains 6 pogramm a
common /myblock/ a,b,c
programm b
common /myblock/ a,b,c if (i .eq. 0) go to 100
[...]
100 a = 1
[...]
200 a = 2Simon Anliker Someone has to write all this stuff.