The following syntax rules apply to all general and OpenMP* Fortran compiler directives. You must follow these rules precisely to compile your program properly and obtain meaningful results.
A directive prefix (tag) takes one of the following forms:
General compiler directives: |
cDEC$ |
OpenMP Fortran compiler directives: |
c$OMP |
c |
Is one of the following: C (or c), !, or *. |
The following prefix forms can be used in place of cDEC$: cDIR$ or !MS$.
The following are source form rules for directive prefixes:
In fixed and tab source forms, prefixes begin with C (or c), *, or !.
The prefix must appear in columns 1 through 5; column 6 must be a blank or a tab1. From column 7 on, blanks are insignificant, so the directive can be positioned anywhere on the line after column 6.
In free source form, prefixes begin with !.
The prefix can appear in any column, but it cannot be preceded by any nonblank, nontab characters on the same line.
In all source forms, directives spelled with two keywords can be separated by an optional space; for example, "LOOP COUNT" and "LOOPCOUNT" are both valid spellings for the same directive. However, when a directive name is preceded by the prefix "NO", this is not considered to be two keywords. For example, "NO PREFETCH" is not a valid spelling; the only valid spelling for this directive is "NOPREFETCH".
A compiler directive ends in column 72 (or column 132, if compiler option extend-source is specified).
General compiler directives cannot be continued. OpenMP Fortran directives can be continued.
A comment beginning with an ! can follow a compiler directive on the same line.
Additional Fortran statements (or directives) cannot appear on the same line as the compiler directive.
Compiler directives cannot appear within a continued Fortran statement.
Blank common used in a compiler directive is specified by two slashes (/ /).
If the source line starts with a valid directive prefix but the directive is not recognized, the compiler displays an informational message and ignores the line.
1 Except for prefix !MS$