HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
DIMENSION (statement and attribute)
Chapter 10 323
[
explicit-shape-spec-list
,] [
lower-bound
:] *
That is,
assumed-size-spec
is
explicit-shape-spec-list
with the final
upper bound specified as *.
attrib-list
is a comma-separated list of attributes including DIMENSION and optionally
those attributes compatible with it, namely:
entity-list
is
object-name
[(
array-spec
)]
If (
array-spec
) is present, it overrides the (
array-spec
) given with the
DIMENSION keyword in
attribute-list
; see the example below.
The syntax of the DIMENSION statement is:
DIMENSION [::]
array-name
(
array-spec
)
[,
array-name
(
array-spec
) ]...
Description
An array consists of a set of objects called the array elements, all of the same type and type
parameters, arranged in a pattern involving columns, and possibly rows, planes, and higher
dimensioned configurations. The type of the array elements may be intrinsic or user-defined.
In HP Fortran, an array may have up to seven dimensions. The number of dimensions is
called the rank of the array and is fixed when the array is declared. Each dimension has an
extent that is the size in that dimension (upper bound minus lower bound plus one). The size
of an array is the product of its extents. The shape of an array is the vector of its extents in
each dimension. Two arrays that have the same shape are said to be conformable.
It is not necessary for the keyword DIMENSION to appear in the declaration of a variable to
give it the DIMENSION attribute. This attribute, as well as the rank, and possibly the extents
and the bounds of an array, may be specified in the entity declaration part of any of the
following statements:
type declaration
Table 10-7
ALLOCATABLE PARAMETER PUBLIC
INTENT POINTER SAVE
OPTIONAL PRIVATE TARGET