HP Fortran Programmer's Guide (September 2007)

Porting to HP Fortran
Compatibility extensions
Chapter 11234
Compiler directives
Compiler directives are coded lines in the source file that control the compiler’s 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
MAP DEC Defines a union within a
structure.
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