Oracle® Solaris Studio 12.4: Fortran User's Guide

Exit Print View

Updated: March 2015
 
 

4.8.2 FIXED and FREE Directives

These directives specify the source form of lines following the directive line.

4.8.2.1 Scope

They apply to the rest of the file in which they appear, or until the next FREE or FIXED directive is encountered.

4.8.2.2 Uses

  • They allow you to switch source forms within a source file.

  • They allow you to switch source forms for an INCLUDE file. You insert the directive at the start of the INCLUDE file. After the INCLUDE file has been processed, the source form reverts back to the form being used prior to processing the INCLUDE file.

4.8.2.3 Restrictions

The FREE/FIXED directives:

  • Each must appear alone on a compiler directive line (not continued).

  • Each can appear anywhere in your source code. Other directives must appear within the program unit they affect.

Example: A FREE directive.

!DIR$ FREE
    DO i = 1, n
        a(i) = b(i) * c(i)
    END DO