Purpose
The DIMENSION attribute specifies the name and dimensions of an array.
Format
>>-DIMENSION--+----+--array_declarator_list--------------------><
'-::-'
|
Rules
According to Fortran 95, you can specify an array with up to seven dimensions.
+-------------------------------IBM Extension--------------------------------+
With XL Fortran, you can specify up to 20 dimensions.
+----------------------------End of IBM Extension----------------------------+
Only one dimension specification for an array name can appear in a scoping unit.
| Attributes Compatible with the DIMENSION Attribute | ||||
|---|---|---|---|---|
|
CALL SUB(5,6)
CONTAINS
SUBROUTINE SUB(I,M)
DIMENSION LIST1(I,M) ! automatic array
INTEGER, ALLOCATABLE, DIMENSION(:,:) :: A ! deferred-shape array
·
·
·
END SUBROUTINE
END
Related Information