Next: AND, Previous: ALL, Up: Intrinsic Procedures
ALLOCATED
— Status of an allocatable entityALLOCATED(ARRAY)
checks the status of whether X is allocated.
RESULT = ALLOCATED(ARRAY)
ARRAY | The argument shall be an ALLOCATABLE array.
|
LOGICAL
with the default logical
kind type parameter. If ARRAY is allocated, ALLOCATED(ARRAY)
is .TRUE.
; otherwise, it returns .FALSE.
program test_allocated integer :: i = 4 real(4), allocatable :: x(:) if (.not. allocated(x)) allocate(x(i)) end program test_allocated