Automatic Arrays
Automatic arrays are arrays that do not appear in the parameter list (i.e., among the dummy arguments) of a subprogram, but whose sizes depend upon values determined from the parameter list. Like other local arrays, automatic arrays are created automatically on entry to the subprogram and destroyed on exit. Examples:
Automatic arrays can take the size of arrays in the parameter list, even if the size itself is not explicitly passed. Example:
In the above, the assumed-shape arrays a
and b
are declared in a way that describes how many dimensions they have, but does not specify any particular sizes along these dimensions.