HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure specifications
Chapter 11624
SIZE(ARRAY, DIM)
Optional argument
DIM
Description
Returns the extent of an array along a specified dimension or the total number of elements in
the array.
Class
Inquiry function.
Arguments
ARRAY may be of any type. It must not be scalar. It must not be a pointer that is
disassociated or an allocatable array that is not allocated. If ARRAY is an
assumed-size array, DIM must be present with a value less than the rank of
ARRAY.
DIM (optional) must be scalar and of type integer with a value in the range 1 <= DIM <=
n
,
where
n
is the rank of ARRAY.
Result type,
type parameters,
and shape
Default integer scalar.
Result value
The result has a value equal to the extent of dimension DIM of ARRAY or, if DIM is absent, the
total number of elements of ARRAY.
Specific forms
KSIZE.