Oracle® Solaris Studio 12.4: Fortran User's Guide

Exit Print View

Updated: March 2015
 
 

4.1.4 Source Form Assumed

The source form assumed by f95 depends on options, directives, and suffixes.

Files with a .f or .F suffix are assumed to be in fixed format. Files with a .f90, .f95, .F90, or .F95 suffix are assumed to be in free format.

Table 4-1  F95 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, it overrides the file name suffix. If either a !DIR$ FREE or !DIR$ FIXED directive is used, it overrides the option and file name suffix.

4.1.4.1 Mixing Forms

Some mixing of source forms is allowed.

  • In the same f95 command, some source files can be fixed form, some free.

  • In the same file, free form can be mixed with fixed form by using !DIR$ FREE and !DIR$ FIXED directives.

  • In the same program unit, tab form can be mixed with free or fixed form.

4.1.4.2 Case

Solaris Studio Fortran 95 is case insensitive by default. That means that a variable AbcDeF is treated as if it were spelled abcdef. Compile with the -U option to have the compiler treat upper and lower case as unique.