
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 ALIASdirective associates the name of a subroutine, function, entry, or common block with an external name and specifies the
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 |
| not to an internal subroutine. If name is enclosed by slashes, it is a common block name. |
| is a character constant that specifies a standard symbolic name. |
•%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:
•It provides a way to associate the name used by your program when referring to a subroutine, function, entry, or common block with a distinct external name. This feature is especially useful when you want to access a variety of different graphics device drivers from the same source code so that different hardware configurations can be supported.
•When used in conjunction with the %VALand
%VAL is a
%REFspecifies that the address of the actual argument is to be passed to the called procedure. For
When %VALand %REF are used with the CALL statement, they override the specification in the $HP$ ALIASdirective. For detailed information about these
124 Using Fortran directives