HP Fortran Programmer's Reference (September 2007)
HP Fortran statements
POINTER (Cray-style extension)
Chapter 10 425
POINTER (Cray-style extension)
Declares Cray-style pointers and their objects.
Syntax
POINTER (
pointer1
,
pointee1
) [, (
pointer2
,
pointee2
)]...
pointer
is a pointer.
pointee
is a variable name or array declarator.
Description
HP Fortran supports both the standard Fortran 90 POINTER statement as well as the
Cray-style POINTER statement. The Cray-style POINTER statement is supported for
compatibility with older, FORTRAN 77 programs. The following information applies only to
the Cray-style POINTER statement; the Fortran 90 POINTER statement is described in
“POINTER (statement and attribute)” on page 428.
The following restrictions apply to
pointer
:
• It should be of type INTEGER(4). If it is not, the compiler interprets its type as
INTEGER(4) regardless of other implicit or explicit type declarations.
• It cannot be declared of any other data type.
• Another pointer cannot point to it.
• It cannot appear in a PARAMETER or DATA statement.
• It cannot be in a derived type object.
You can increase the size of
pointer
with the +autodbl or +autodbl4 option.
pointee
may be of any type, including an array, a derived type, a record, or a character string.
The following restrictions apply to
pointee
:
• It cannot be a dummy argument, function name, function value, common block element,
automatic object, generic interface block name, or derived type.
• It cannot be used in a COMMON, DATA, EQUIVALENCE, or NAMELIST statement.
• It cannot have any of the following attributes: ALLOCATABLE, EXTERNAL, INTENT,
INTRINSIC, OPTIONAL, PARAMETER, POINTER, SAVE, and TARGET.