An assumed-size array is a dummy array for which the upper bound of
the last dimension is specified as an asterisk (*), for example:
SUBROUTINE SUB(A,N)
DIMENSION A(1:N,1:*)
If the lower bound of an assumed-size array is not specified, it
is assumed to be 1. Therefore, the previous DIMENSION statement is
equivalent to the following:
DIMENSION A(1:N,*)
The size of an assumed-size array and the number of elements that
can be referenced are determined as follows:
- If the actual argument corresponding to the dummy array
is a name of a noncharacter array, the size of the dummy array is
the size of the actual-argument array.
- If the actual argument corresponding to the dummy
argument is a name of a noncharacter array element, with a
subscript value of s in an array of size a,
the size of the dummy array is a+1-s.
- If the actual argument is a name of a character array,
character array element, or character array element substring
and begins at character storage unit b of an array
with n character storage units, the size of the dummy array is
INT(n+1-b)/y, where y is the
length of an element of the dummy array.
Because the actual size of an assumed-size array is unknown, an
assumed-size array name cannot be used as any of the following items
in an I/O statement:
- An array name in the I/O list
- A unit identifier for an internal file
- A run-time format specifier
Previous Page Next Page Table of Contents