5.1.4.3 Assumed-Size Specifications

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:

([expli-shape-spec,] [expli-shape-spec,]... [dl:] *)

expli-shape-spec
Is an explicit-shape specification (see Section 5.1.4.1).

dl
Is a specification expression indicating the lower bound of the dimension. The expression can have a positive, negative, or zero value. If necessary, the value is converted to integer type.

If the lower bound is not specified, it is assumed to be 1.

*
Is the upper bound of the last dimension.

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:

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.


Previous Page Next Page Table of Contents