Library /sys$common/syshlp/helplib.hlb  —  FORTRAN  Data  Arrays  Declarators  Assumed Size
  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:

     [exp-shape-spec,] [exp-shape-spec,]... [lower-bound:] *

  The exp-shape-spec is an explicit-shape specification (see DATA
  ARRAY DECL EXPL in online Help).

  The lower bound and upper bound are specification expressions that
  have a positive, negative, or zero value.  If necessary, the bound
  value is converted to integer type.  If a lower bound is not
  specified, it is assumed to be 1.

  The asterisk (*) represents 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:

   o  If the actual argument is an array of type other than default
      character, the size of the dummy array is the size of the
      actual array.

   o  If the actual argument is an array element of type other than
      default character, the size of the dummy array is a + 1 - s,
      where "s" is the subscript value and "a" is the size of the
      actual array.

   o  If the actual argument is a default character array, array
      element, or array element substring, and it begins at character
      storage unit b of an array with n character storage units, the
      size of the dummy array is as follows:

        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:

   o  When it is an actual argument in a procedure reference that
      does not require the shape

   o  In the intrinsic function LBOUND

  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:

   o  An array name in the I/O list

   o  A unit identifier for an internal file

   o  A run-time format specifier

  The following is an example of an assumed-size specification:

    SUBROUTINE SUB(A, N)
      REAL A, N
      DIMENSION A(1:N, *)
      ...
Close Help