ARRAY REFERENCE Declaration

An ARRAY REFERENCE declaration is used to establish an array reference variable. The array reference assignment statement can then be used to assign an array or part of an array to this variable.

<array reference declaration>

──┬───────────┬─┬──────────┬─┬───────────────┬─ ARRAY ── REFERENCE ────►
  ├─ PRIVATE ─┤ └─ DIRECT ─┘ └─<array class>─┘
  └─ PUBLIC ──┘
  ┌◄──────────────────── , ───────────────────┐
  │ ┌◄───── , ─────┐                          │
►─┴─┴─<identifier>─┴─ [ ──<lower bounds>── ] ─┴────────────────────────┤

Following an array reference assignment, any subsequent use of the array reference identifier acts as a reference to the array assigned to it. For more information on array reference assignment, see Array Reference Assignment.

The PRIVATE and PUBLIC specifiers can only be used for array reference variables that are declared within a structure block or a connection block. The PRIVATE specifier limits visibility of the array reference variable to the scope of the structure block or a connection block. A PRIVATE array reference variable cannot be accessed using a structure or connection block qualifier. The PUBLIC specifier allows the array reference variable to be accessed using a structure or connection block qualifier. If neither PRIVATE nor PUBLIC is specified, the default value is PUBLIC and access to the array reference variable using a structure or connection block qualifier is allowed.

If the array class is not specified as COMPLEX, the array reference variable can be declared as DIRECT. This declaration enables the array reference variable to be used in direct I/O operations.

If an array class is not specified, a REAL array is assumed.