I only use pointers on the rare occasions when I can't use dynamically
allocatable arrays, so I apologise if this is a basic question with an
obvious answer.
Is there a simple way to determine the association status of a pointer
variable, analogous to the intrinsic ALLOCATED function for non-pointer
arrays with the ALLOCATABLE attribute? Salford FTN90 gives the error
message
"ARRAY argument to ALLOCATED intrinsic is not ALLOCATABLE"
when I try to use the ALLOCATED function on a dynamically allocated pointer
array.
I know that I could use my own logical variable, called for instance
POINTER_ARRAY_ALLOCATED, and set it to .TRUE. after allocation and .FALSE.
after deallocation, but I don't consider this to be ideal.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|