An adjustable array is an array that is a dummy argument or local array@ with one or more of its dimensions or bounds as an expression of integer variables that are either themselves dummy arguments, or are in a common block.
You can declare adjustable arrays in the usual DIMENSION or type statements. In f77, you can also declare adjustable arrays in a RECORD statement, if that RECORD statement is not inside a structure declaration block.
SUBROUTINE POPUP ( A, B, N ) COMMON / DEFS / M, L REAL A(3:5, L, M:N), B(N+1:2*N) ! These arrays are dummy args REAL C(N+1,2*N) ! This array is local
The restrictions are:
The size of an adjustable array cannot exceed the size of the corresponding actual argument.
In the first caller of the call sequence, the corresponding array must be dimensioned with constants.
You cannot declare an adjustable array in COMMON.
If the array is local to the routine, memory is allocated on entry to the routine and deallocated on return to the caller.@