Fortran User's Guide

Command-Line File Name Conventions

The suffix extension attached to file names appearing on the command-line determine how the compiler will process the file. File names with a suffix extension other than one of those listed below, or without an extension, are passed to the linker.

Table 2-1 File Name Suffixes Recognized by Sun Fortran Compilers

Suffix  

Language 

Action  

.f

Fortran 77 or Fortran 90 fixed-format 

Compile Fortran source files, put object files in current directory; default name of object file is that of the source but with .o suffix.

.f90

Fortran 90 free-format 

Same action as .f (f90 only)

.for

Fortran 77 

Same action as .f.

.F

Fortran 77 or Fortran 90 fixed-format 

Apply the Fortran (or C) preprocessor to the Fortran 77 source file before compilation.  

.F90

Fortran 90 free-format 

Apply the Fortran (or C) preprocessor to the Fortran 90 free-format source file before Fortran compiles it.  

.s

Assembler  

Assemble source files with the assembler.  

.S

Assembler 

Apply the C preprocessor to the assembler source file before assembling it.  

.il

Inline expansion 

Process template files for inline expansion. The compiler will use templates to expand inline calls to selected routines. (Template files are special assembler files; see the inline(1) man page.)

.o

Object files  

Pass object files through to the linker. 

.a,.so, .so.n

Libraries 

Pass names of libraries to the linker. .a files are static libraries, .so and .so.n files are dynamic libraries.

Fortran 90 free-format is described in Appendix C of this manual.