VMS Help  —  FORTRAN  Data  Arrays  Declarators  Explicit Shape, Automatic Arrays
  An automatic array is an explicit-shape array that is a local
  variable.  Automatic arrays are only allowed in function and
  subroutine subprograms, and are declared in the specification part
  of the subprogram.  At least one bound of an automatic array must
  be a nonconstant specification expression.  The bounds are
  determined when the subprogram is called.

  The following example shows automatic arrays:

    SUBROUTINE SUB1 (A, B)
      INTEGER A, B, LOWER
      COMMON /BOUND/ LOWER
      ...
      INTEGER AUTO_ARRAY1(B)
      ...
      INTEGER AUTO_ARRAY2(LOWER:B)
      ...
      INTEGER AUTO_ARRAY3(20, B*A/2)
    END SUBROUTINE
Close Help