### 15.2.3.1 Conditional Compilation Rules (TU*X only)

The OpenMP Fortran API lets you conditionally compile Compaq Fortran statements if you use the appropriate directive prefix.

The prefix depends on which source form you are using, although !$ is valid in all forms.

The prefix must be followed by a valid Compaq Fortran statement on the same line.

Fixed Source Form

For fixed source form programs, the conditional compilation prefix is one of the following: !$ , C$ (or c$), or *$.

The prefix must start in column one and appear as a single string with no intervening white space. Fixed-form source rules apply to the directive line.

Initial lines must have a space or zero in column six, and continuation lines must have a character other than a space or zero in column six. For example, the following forms for specifying conditional compilation are equivalent:

      c23456789
      !$    IAM = OMP_GET_THREAD_NUM( ) +
      !$   *      INDEX

      #IFDEF _OPENMP
            IAM = OMP_GET_THREAD_NUM( ) +
           *      INDEX
      #ENDIF

Free Source Form

The free source form conditional compilation prefix is !$. This prefix can appear in any column as long as it is preceded only by white space. It must appear as a single word with no intervening white space. Free-form source rules apply to the directive line.

Initial lines must have a space after the prefix. Continued lines must have an ampersand as the last nonblank character on the line. Continuation lines can have an ampersand after the prefix with optional white space before and after the ampersand.

For More Information:

- On how the conditional prefix is interpreted, see your user manual.
- On a macro that can be used to denote conditional compilation, see your user manual.

Previous Page Next Page Table of Contents