HP Fortran Programmer's Guide (B3908-90031; September 2011)

Compiling and linking
Compiling with the f90 command
Chapter 2 77
Filenames
The f90 command accepts files with any of the filename extensions listed in Table 2-12. The table also
describes the meaning each name has for the f90 command. Files with names other than those listed in the
table are passed to the linker.
NOTE The compiler generates a .mod file for each file that defines a Fortran module. It also reads
the .mod files when compiling source files that use modules. Do not specify .mod files on
the command line. If you do, the compiler will pass them to the linker, which will try (and
fail) to link them into the executable. For more information about .mod files, see
“Compiling programs with modules” on page 85.
Table 2-12 Filenames recognized by f90
Filenames Meaning
file.f90 Free-form Fortran source code; processed by the compiler.
file.f Fixed-form Fortran source code; processed by the compiler.
file.F Fixed-form Fortran source code; first processed by the C
preprocessor (cpp), then by the compiler.
file.i90 Free-form output from the C preprocessor (if the source file ends
in .f90); processed by the compiler.
file.i Fixed-form output from the C preprocessor (if the source file
ends in .F or .f); processed by the compiler.
file.o Object code; passed to the linker (ld).
file.s Assembly language code; passed to the assembler (as).