An array declarator declares the shape of an array.
You must declare every named array, and no scoping unit can have
more than one array declarator for the same name. An array declarator
can appear in any of the Compatible Statements and Attributes for Array
Declarators table.
Table 4. Compatible Statements and Attributes for Array Declarators
ALLOCATABLE | AUTOMATIC | COMMON |
DIMENSION | PARAMETER | POINTER (integer) |
POINTER | STATIC | TARGET |
Type Declaration |
|
|
For example:
DIMENSION :: A(1:5) ! Declarator is "(1:5)" REAL, DIMENSION(1,1:5) :: B ! Declarator is "(1,1:5)" INTEGER C(10) ! Declarator is "(10)"
The form of an array declarator is:
>>-(--array_spec--)-------------------------------------------->< |
An array_spec is one of:
Each array_spec declares a different kind of array, as explained in the following sections.