HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
INTENT (statement and attribute)
Chapter 10388
INTENT (statement and attribute)
Specifies the intended use of dummy arguments.
Syntax
A type declaration statement with the INTENT attribute is:7
type
,
attrib-list
::
dummy-arg-name-list
type
is a valid type specification (INTEGER, REAL, LOGICAL, CHARACTER, TYPE
(
name
), etc.).
attrib-list
is a comma-separated list of attributes including INTENT(
intent-spec
)
and the optional attributes compatible with it, shown below:
intent-spec
is one of IN, OUT, or INOUT. (The form IN OUT is valid.)
dummy-arg-name-list
is a comma-separated list of subprogram dummy arguments to which
intent-spec
is to apply.
The syntax of the INTENT statement is:
INTENT (
intent-spec
) [::]
dummy-arg-name-list
Description
The INTENT attribute declares whether a dummy argument is intended for transferring a
value into a procedure, or out of it, or both. The INTENT attribute helps detect the use of
arguments inconsistent with their intended use, and may also assist the compiler in
generating more efficient code.
If a dummy argument has intent IN, the procedure must not change it or cause it to become
undefined. If the actual argument is defined, this value is passed in as the value of the dummy
argument.
Table 10-29
DIMENSION OPTIONAL TARGET