9.3.10 ALLOCATED (ARRAY)

Description:  Indicates whether an allocatable array is currently allocated. 
Class:  Inquiry function; Generic 
Arguments:  ARRAY must be an allocatable array.  
Results:  The result is a scalar of type default logical.

The result has the value true if ARRAY is currently allocated, false if ARRAY is not currently allocated, or undefined if its allocation status is undefined.  

Examples

Consider the following:

REAL, ALLOCATABLE, DIMENSION (:,:,:) :: E
PRINT *, ALLOCATED (E)       ! Returns the value false
ALLOCATE (E (12, 15, 20))
PRINT *, ALLOCATED (E)       ! Returns the value true


Previous Page Next Page Table of Contents