IBM Books

Language Reference


Allocation Status

The allocation status of an allocatable array is one of the following during program execution:

  1. Not currently allocated, which means that the array has never been allocated or that the last operation on it was a deallocation.

  2. Currently allocated, which means that the array has been allocated by an ALLOCATE statement and has not been subsequently deallocated.

  3. Undefined, which means that the array does not have the SAVE or STATIC attribute and was currently allocated when execution of a RETURN or END statement resulted in no executing scoping units having access to it. This status is only available when you are using the -qxlf90=noautodealloc option. (For example, you are using the xlf90 compilation command.)

In Fortran 95, the allocation status of an allocatable array that is declared in the scope of a module is processor dependent if it does not have the SAVE attribute and was currently allocated when execution of a RETURN or END statement resulted in no executing scoping units referencing the module.

In XL Fortran, the allocation status of such an array remains currently allocated.

If the allocation status of an allocatable array is currently allocated, the array may be referenced and defined. An allocatable array that is not currently allocated must not be referenced or defined. If the allocation status of an allocatable array is undefined, the array must not be referenced, defined, allocated, or deallocated.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ] © Copyright IBM Corporation 1990, 1998