Fortran 90: Look and Feel

Source Format

There are now two types of formats: fixed form and free form.

Fixed form is the Fortran 77 standard plus

Free form allows The current f77 convention of putting a "c" or "*" in column 1 for comments will generate a syntax error in free format form. The IBM compiler assumes free format unless the flag -q fixed is used. Existing f77 routines should be compiled with this flag.

Variable declarations

Variables can be declared according to the old syntax,
integer i,j
real*8 a(3,2)
integer imax
parameter (imax=30)
or a new syntax where the type can be followed by attributes. These are separated from the variable by a double colon. For example
integer :: i
real*8 :: a(3,2)
real*8, dimension(3,2) :: a
integer, parameter :: imax = 30
integer, allocatable :: b(:)

Return to Fortran 90 index