Optional argument. `DIM`

Description. Returns all the upper bounds or a specified upper
bound of the actual HPF global array argument associated
with an HPF_LOCAL dummy array argument.

Class. Inquiry function.

Arguments.

ARRAY may be of any type. It must not be a scalar. It must be a dummy array argument of an HPF_LOCAL procedure which is argument associated with a global HPF array actual argument.

DIM (optional) must be scalar and of type integer with a
value in the range ,
where is the rank of ARRAY. The
corresponding actual argument must not be an
optional dummy argument.

Result Type, Type Parameter and Shape. The result is of type default
integer. It is scalar if `DIM` is present;
otherwise the result is an array of rank one
and size , where is the rank of
`ARRAY`.

Result Value.

(i): If the actual argument associated with the actual
argument associated with `ARRAY` is an array
section or an array expression, other than a whole
array or an array structure component,
`GLOBAL_UBOUND(ARRAY, DIM)` has a value equal to
the number of elements in the given dimension;
otherwise it has a value equal to the upper bound for
subscript `DIM` of the actual argument associated
with the actual argument associated with
`ARRAY`, if dimension `DIM` does not have
size zero and has the value zero if dimension
`DIM` has size zero.

(ii): `GLOBAL_UBOUND(ARRAY)` has a value whose th
component is equal to `GLOBAL_UBOUND(ARRAY, )`,
for where is the rank of
`ARRAY`.

Examples. Assuming `A` is declared by the statement

` INTEGER A(3:100, 200)`

and is argument associated with `B`, the value of
`GLOBAL_UBOUND(B)` is ,100 200,, plus 1filll
-1;100 200,; plus 1filll
-1:100 200,: plus 1filll
-1.100 200,. plus 1filll
-1100 200, plus 1filll-1.
If `B` is argument associated with the section,
`A(5:10, 7:10)`, the value of
`GLOBAL_UBOUND(B, 1)` is 6.

new

Thu Dec 8 16:17:11 CST 1994