Table 42 Compatibility statements (continued)

Statement

Implementation

Description

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.

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. See 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” (page 104).

As noted in the table, some of the compatibility directives are effective only if the source file is compiled with either the +Oparallel or the +Ovectorize option; otherwise, the directive is treated as a comment and ignored. For information about using these options, see “Using the +Ovectorize option” (page 103).

Table 43 Compatibility directives

Vendor

Directive

Function

Option dependency

 

 

 

 

 

Cray

DIR$

IVDEP

Disables dependency checks.

+Oparallelor

 

 

 

 

+Ovectorize

 

 

 

 

 

 

DIR$

NO SIDE EFFECTS

Disables checks for side

+Oparallelor

 

 

 

effects.

+Ovectorize

 

 

 

 

 

 

 

 

 

 

DIR$

[NO]CONCUR

Enables [disables] code

+Oparallel

 

 

 

generation for parallel

 

 

 

 

execution.

 

 

 

 

 

 

 

DIR$

[NO]VECTOR

Enables [disables]

+Ovectorize

 

 

 

vectorization.

 

 

 

 

 

 

 

FPP$

NODEPCHK

Disables dependency checks

+Oparallel or

 

 

 

 

+Ovectorize

 

 

 

 

 

142 Porting to HP Fortran