An assumed-size array is a dummy argument array that assumes the size (only) of its associated actual argument array; the rank and extents can differ for the actual and dummy arrays. An assumed-size specification takes the following form:
If the lower bound is not specified, it is assumed to be 1.
The rank of the array is the number of explicit-shape specifications plus 1.
The size of the array is assumed from the actual argument associated with the assumed-size dummy array as follows:
a + 1 - s
, where s is the subscript order value and
a is the size of the actual array. MAX(INT((n + 1 - b)/y), 0)
The y is the length of an element of the dummy array.
An assumed-size array can only be used as a whole array reference in the following cases:
Because the actual size of an assumed-size array is unknown, an assumed-size array cannot be used as any of the following in an I/O statement:
The following is an example of an assumed-size specification:
SUBROUTINE SUB(A, N)
REAL A, N
DIMENSION A(1:N, *)
...
For More Information:
For details on array element order, see Section 3.4.2.2.