previous up next print clean
Next: Parameter handling Up: SEP EXTENSIONS Previous: SEP EXTENSIONS

Memory allocation

The main method at SEP for dynamic memory allocation under Ratfor77, saw, and sat was the allocate statement:
	allocate: real x(n1,n2)
When Ratfor90 finds this statement, along with the corresponding main program/subroutine structure of saw and sat, it translates the allocate: statement into a Fortran allocatable array, allocates the array, and passes it, along with all other relevant variables to the subroutine.

In subroutines SEP allowed dynamic memory allocation through the use of the temporary keyword, for example:

temporary real*4 data(n1,n2,n3), convolution(j+k-1)

Automatic arrays are supported in Fortran90 so Ratfor90 simply translates this statement to:

real*4 data(n1,n2,n3), convolution(j+k-1).


previous up next print clean
Next: Parameter handling Up: SEP EXTENSIONS Previous: SEP EXTENSIONS
Stanford Exploration Project
10/9/1997