HP Fortran Programmer's Reference (September 2007)
Expressions and assignment
Expressions
Chapter 4 95
! integer nor character type
SUM( (/ i, 2 /) ) ! reference to a prohibited function
For information about initializing arrays with an array constructor, see “Array constructors”
on page 75.
Specification expressions
A specification expression has a scalar value, is of type integer, and can be evaluated on
entry to the scoping unit in which it appears. A specification expression may appear (for
example) as a bound in an array declaration or as the length in a CHARACTER type declaration.
An operand in a specification expression is one of the following:
• A literal or named constant or part of a constants.
• A variable that is available by argument, host, or use association or is in common.
• An array constructor or structure constructor where each element or component is also a
specification expression or is a variable in an implied-DO loop appearing in the array
constructor.
• A dummy argument having neither the OPTIONAL attribute nor the INTENT(OUT)
attribute.
• An argument to an intrinsic function.
• A reference to an elemental intrinsic function that returns an integer result.
• A reference to any of the following transformational intrinsic functions:
❏ REPEAT
❏ RESHAPE
❏ SELECTED_INT_KIND
❏ SELECTED_REAL_KIND
❏ TRANSFER
❏ TRIM
• Any inquiry intrinsic except ALLOCATED, ASSOCIATED, and PRESENT. Other inquiry
intrinsics may be referenced so long as the property interrogated is not defined by either a
pointer assignment or ALLOCATE statement. Furthermore, an inquiry intrinsic may not
interrogate the following properties of an assumed size array:
❏ Upper bound of the last dimension
❏ Extent of the last dimension