Dear all,
Is there a way to distinguish between an array of pointers and a pointer
to an array? If I understand it right, Fortran90 normally uses the
latter. Consider the following program:
PROGRAM arrayp
IMPLICIT NONE
INTEGER,TARGET :: i
INTEGER,DIMENSION(5),TARGET ::ai
INTEGER,DIMENSION(:),POINTER ::ap
ap=>ai ! Valid, pointer to an aray
ap(1)=>i ! Error: Object is not a pointer object [AP]
END PROGRAM arrayp
I get the given error message at the last line of the program.
Alternatively, is there a way to create an array of pointers?
Many thanks,
Jose
|