ALLOCATED(ARRAY)
and ALLOCATED(SCALAR)
check the allocation status of ARRAY and SCALAR, respectively.
Fortran 90 and later. Note, the SCALAR=
keyword and allocatable scalar entities are available in Fortran 2003 and later.
Inquiry function
RESULT = ALLOCATED(ARRAY) |
RESULT = ALLOCATED(SCALAR) |
ARRAY | The argument shall be an ALLOCATABLE array. |
SCALAR | The argument shall be an ALLOCATABLE scalar. |
The return value is a scalar LOGICAL
with the default logical kind type parameter. If the argument is allocated, then the result is .TRUE.
; otherwise, it returns .FALSE.
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gfortran/ALLOCATED.html