Defining the following tree structure with a pointer to an array inside:
TYPE :: node
DOUBLE PRECISION :: xmin,ymin,zmin
DOUBLE PRECISION :: xmax,ymax,zmax
TYPE(node), POINTER :: before
TYPE(node), POINTER :: next
INTEGER, DIMENSION(:), POINTER :: elein
An operation access violation error occurs in following code:
IF( ASSOCIATED(ptr%elein) ) THEN
I found ptr%elein is in the state of undefined pointer/array, but it still goes into the if block. That means, the function ASSOCIATED didn't work.
Do anyone know what's the reason?