HP Fortran Programmer's Reference (September 2007)

Expressions and assignment
Expressions
Chapter 496
Size of the array
Shape of the array
The differences between specification expressions and initialization expressions are
summarized in Table 4-4.
The following are examples of specification expressions:
789 ! an integer literal constant
MAX(m+n,0) ! m and n are integer dummy arguments
LEN(c) ! c is a character variable accessible via
! host association
SELECTED_INT_KIND(5) ! reference to a transformational
! intrinsic
UBOUND(arr,DIM=n) ! reference to an array inquiry
! intrinsic in which arr is an array
! accessible via USE and n is a
! variable in common
Table 4-4 Initialization and specification expressions
Initialization expression Specification expression
Can be either scalar or array-valued. Must be scalar-valued.
Can be of any type. Must be of type integer.
Must be a constant expression. Can reference variables by host, argument, or
use storage association; can reference
variables in common.
Except for ALLOCATED, ASSOCIATED, and
PRESENT, can reference inquiry intrinsics
to interrogate a property of an entity,
provided that the property is constant.
Can reference inquiry intrinsic functions,
except for ALLOCATED, ASSOCIATED, and
PRESENT. The arguments must be
specification expressions or variables whose
bounds or type parameters inquired about are
not assumed, are not defined by the ALLOCATE
statement, or are not defined by pointer
assignment.