HP Fortran Programmer's Guide (September 2007)

Using Fortran directives
Using HP Fortran directives
Chapter 9 203
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:
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.