HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
PARAMETER (statement and attribute)
Chapter 10422
If the named constant is of type character and its length is not specified, the length must be
specified in a type declaration statement or IMPLICIT statement prior to the first appearance
of the named constant. Its type and/or length must not be changed by subsequent statements,
including IMPLICIT statements. If a symbolic name of type CHARACTER*(*) is defined in a
PARAMETER statement, its length becomes the length of the expression assigned to it.
If the named constant is an array, the bounds must be explicit and determined by an
initialization expression.
Once such a symbolic name is defined, that name can appear in any subsequent statement of
the defining program unit as a constant in an expression or DATA statement.
Examples
! PARAMETER used in a type declaration statement as an attribute
REAL, DIMENSION(4), PARAMETER :: const = &
(/1.2, 1.45, 0.9, 24.3/)
INTEGER year
! PARAMETER used as a statement
PARAMETER year = 1996
! Type declaration statement declaring a derived-type constant
TYPE (postal_info), PARAMETER :: package = &
postal_info (9.5, (/10.0, 5.5, 2.25/) )
Related concepts
For information about the type declaration statement, see “Type declaration for intrinsic
types” on page 109.