|
302. Dynamic Array Assignment in FORTRAN
by C. E. Reid, Quantum Theory Project, University of Florida, Gainesville, Florida 32601 This program permits the FORTRAN programmer to request assignment for arrays during execution instead of requesting it at compilation time by DIMENSION statement. Of the several programs which are available to accomplish this task, this program has the following advantages: 1. On return from the program to which arrays are assigned, the space may be released or retained; if retained, it may be released later. 2. Arrays may be located at addresses differing by some specified amount, thus effectively equivalencing the arrays, with or without an offset. 3. The amount of space requested may be expressed in terms of number of items of any of the standard item lengths, and these lengths may be mixed within any one call. 4. The MVT form of GETMAIN, in which requests for several blocks of storage are made with one GETMAIN macroinstruction, is used; each block assigned in this manner is aligned on a double- word boundary. 5. Error messages and some debugging information are provided for instances in which the request cannot be completed. BAL (IBM 360/370 Assembly Language) Lines of Code: 308 Recommended Citation: C. E. Reid, QCPE 11, 302 (1976). |