The source form assumed by f90 depends on options, directives, and suffixes.
Table C-1 F90 Source Form Command-line options
Option |
Action |
---|---|
-fixed |
Interpret all source files as Fortran fixed form |
-free |
Interpret all source files as Fortran free form |
If the -free or -fixed option is used, that overrides the file name suffix.
Table C-2 F90 File name suffixes
Suffix |
Source Form |
---|---|
.f90 |
Fortran free-form source files |
.f |
Fortran fixed-form source files or ANSI standard FORTRAN 77 source files |
.for |
Same as .f. |
.ftn |
Same as .f. |
other |
None--file name is passed to the linker |
If either a FREE or FIXED directive is used, that overrides the option and file name suffix.
Some mixing of source forms is allowed.
In the same f90 command, some source files can be fixed form, some free.
In the same file, free form can be mixed with fixed form by using directives.
In the same program unit, tab form can be mixed with free or fixed form.
Sun Fortran 90 is case insensitive. That means that a variable AbcDeF is treated as if it were spelled abcdef, or abcdeF, etc. "Compatibility with FORTRAN 77"