0

Suppose I have an array:

REAL,TARGET :: X(3,3)

I would like to use a pointer array like:

REAL,POINTER :: P(:)

To sequentially access the data stored in X

How can I do this?

Xie Qing
  • 81
  • 7

1 Answers1

1

Pointer rank remapping allows an array pointer to reference a simply contiguous or rank one target, that is of a different rank to the pointer, using a form of the pointer association statement. For the example in the question:

P(1:9) => X
IanH
  • 21,026
  • 2
  • 37
  • 59