I\'m a bloody beginner in Fortran.
I wonder: what is the difference between the .f and .F extensions of Fortran files. I know that muc
As far as I know, .f
and .F
are both extensions associated with the FORTRAN 77 fixed format. Fixed format is limitted to 72 columns, where the first six columns serve special purposes. E.g. a &
at position 6 indicates a line continuation from the previous line.
Free-form was introduced with Fortran 90 and is typically indicated by .f90
and .F90
. For free-form you can use up to 132 columns, and no special columns exist. Line continuation is indicated by an ampersand at the end of the line.
Capital letters in the file extension usually turn the pre-processor on.
Note that these are conventions that can be overridden with compile options for most compilers.