HP Fortran Programmer's Guide (B3908-90031; September 2011)

Porting to HP Fortran
Compatibility extensions
Chapter 11240
Compiler directives
Compiler directives are coded lines in the source file that control the compilers state. Many vendors use a
directive syntax that enables the compiler to treat the directive as a comment unless the compiler is
specifically looking for that directive. For example, all directives recognized by HP Fortran begin with the
character ! in free format or C, *, or ! in fixed format (in fixed format, the directive must also start in
column 1).
A directive that uses the comment-like syntax will not cause the compilation to fail. However, if the
compiler does not recognize the directive, then the functionality that the directive enables will be lost.
The directives listed in Table 11-2 are recognized by HP Fortran and are compatible with those available on
other implementations. These directives are functionally compatible; that is, their effect on HP Fortran is
compatible with that on the original implementation. Refer to the HP Fortran Programmer’s Reference for
detailed descriptions of the directives to check the level of compatibility. For usage information about these
directives, see “Controlling vectorization locally” on page 168.
POINTER (Cray-style) Cray Declares Cray-style pointers
and their objects.
RECORD DEC Declares a record of a
previously defined structure.
STATIC Sun Allocates storage in static
memory.
STRUCTURE DEC Defines a named structure.
TYPE (I/O) DEC Writes to standard output.
UNION DEC Defines a union within a
structure.
VIRTUAL DEC Declares an array.
VOLATILE DEC Allows data sharing between
asynchronous processes.
Table 11-1 Compatibility statements (Continued)
Statement Implementation Description