A pointer can be associated with a target. At different times during the execution of a program, a pointer can be undefined, associated with different targets, or be disassociated. The initial association status of a pointer is undefined. A pointer can become associated by the following:
The target must be associated, or specified with the TARGET attribute. If the target is allocatable, it must be currently allocated.
The ALLOCATE statement must reference the pointer.
A pointer becomes disassociated if any of the following occur:
When a pointer is associated with a target, the definition status of the pointer is defined or undefined, depending on the definition status of the target. A target is undefined in the following cases:
If a pointer is associated with a definable target, the definition status of the pointer can be defined or undefined, according to the rules for a variable.
If the association status of a pointer is disassociated or undefined, the pointer must not be referenced or deallocated.
Whatever its association status, a pointer can always be nullified, allocated, or associated with a target. When a pointer is nullified, it is disassociated. When a pointer is allocated, it becomes associated, but is undefined. When a pointer is associated with a target, its association and definition status are determined by its target.
For More Information: