FORTRAN 77 Language Reference

Adjustable Arrays

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.

Example: Adjustable arrays;


	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:

If the array is local to the routine, memory is allocated on entry to the routine and deallocated on return to the caller.@