Oracle® Solaris Studio 12.4: Fortran User's Guide

Exit Print View

Updated: March 2015
 
 

2.2 Invoking the Compiler

The syntax of a simple compiler command invoked at a shell prompt is:

f95 [options] files...

Here files… is one or more Fortran source file names ending in .f, .F, .f90, .f95, .F90, .F95, or .for; options is one or more of the compiler option flags. (Files with names ending in a .f90 or .f95 extension are “free-format” Fortran 95 source files recognized only by the f95 compiler.)

In the example below, f95 is used to compile two source files to produce an executable file named growth with runtime debugging enabled:

demo% f95 -g -o growth growth.f fft.f95

Note -  You can invoke the Fortran compiler with either the f95 or f90 command.

New: The compiler will also accept source files with the extension .f03 or .F03. These are treated as equivalent to .f95 and .F95 and could be used as a way to indicate that a source file contains Fortran 2003 extensions.

Command-Line File Name Conventions, describes the various source file extensions accepted by the compiler.