next up previous contents
Next: Deallocating Arrays Up: Arrays Previous: Array Constructors in Initialisation

 

Allocatable Arrays

Fortran 90 allows arrays to be created on-the-fly; these are known as deferred-shape arrays and use dynamic heap storage (this means memory can be grabbed, used and then put back at any point in the program). This facility allows the creation of ``temporary'' arrays which can be created used and discarded at will.

Deferred-shape arrays are:

There is a certain overhead in managing dynamic or ALLOCATABLE arrays -- explicit-shape arrays are cheaper and should be used if the size is known and the arrays are persistent (are used for most of the life of the program). The dynamic or heap storage is also used with pointers and obviously only has a finite size -- there may be a time when this storage runs out. If this happens there may be an option of the compiler to specify / increase the size of heap storage.

Return to corresponding overview page gif


next up previous contents
Next: Deallocating Arrays Up: Arrays Previous: Array Constructors in Initialisation

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.