Returns the association status of its pointer argument, or indicates whether the pointer is associated with the target.
Inquiry function
Default logical scalar.
If only the POINTER argument is specified, the result is .TRUE. if it is associated with any target and .FALSE. otherwise. If TARGET is also specified, the procedure tests whether POINTER is associated with TARGET, or with the same object that TARGET is associated with (if TARGET is also pointer).
If a POINTER and a TARGET of a different shape are associated, this intrinsic will return .FALSE..
Objects with different types or shapes cannot be associated with each other.
Arrays with the same type and shape but different bounds can be associated with each other.
REAL, POINTER, DIMENSION(:,:) :: A
REAL, TARGET, DIMENSION(5,10) :: B, C
NULLIFY (A)
PRINT *, ASSOCIATED (A) ! False, not associated yet
A => B
PRINT *, ASSOCIATED (A) ! True, because A is
! associated with B
PRINT *, ASSOCIATED (A,C) ! False, A is not
! associated with C
END