HP Fortran Programmer's Guide (March 2010)
Using Fortran directives
Using HP Fortran directives
Chapter 9 217
In files that use free format, directives must start with the comment character !. In fixed
format, they must start with the comment character C, *, or ! in column 1. Keywords and any
arguments must be delimited by at least one space character, as in the following:
!$HP$ OPTIMIZE ON
Using the comment character as the directive prefix ensures that, unless the compiler is
specifically looking for the directive, it is otherwise treated as a comment and ignored.
The following sections describe each of the HP Fortran directives.
$HP$ ALIAS
The ALIAS directive associates the name of a subroutine, function, entry, or common block
with an external name and specifies the parameter-passing conventions of routines written in
other languages.
Syntax
!$HP$ ALIAS name [= external-name ] [(arg-pass-mode-list)]
name
is the name used by the program to refer to a subroutine, function, or
procedure entry point—but not to an internal subroutine. If name is
enclosed by slashes, it is a common block name.
external-name
is a character constant that specifies a standard symbolic name.
arg-pass-mode-list
is used only when name is that of a procedure that takes arguments. The
items in the list specify how the corresponding actual argument are to be
passed. The items can be either of the following built-in functions:
• %VAL: pass the value of the actual argument
• %REF: pass the address of the actual argument
There must be as many items in the list as there are arguments in the
procedure, they must be separated by commas, and they must correspond
positionally to the arguments.
Description and restrictions
The $HP$ ALIAS directive serves two purposes: