Returns the association status of its pointer argument, or indicates whether the pointer is associated with the target.
Result Type and Attributes
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).
The result is undefined if either POINTER or TARGET is associated with a zero-sized array, or if TARGET is a zero-sized array.
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