POINTER - Integer

Statement: Establishes pairs of objects and pointers, in which each pointer contains the address of its paired object. This statement is different from the Fortran 95/90 POINTERstatement.

Syntax

POINTER (pointer,pointee) [,(pointer,pointee)] . . .

pointer

Is a variable whose value is used as the address of the pointee.

pointee

Is a variable; it can be an array name or array specification. It can also be a procedure named in an EXTERNAL statement or in a specific (non-generic) procedure interface block.

The following are pointer rules and behavior:

The following are pointee rules and behavior:

Example

POINTER (p, k)

INTEGER j(2)

! This has the same effect as j(1) = 0, j(2) = 5

p = LOC(j)

k = 0

p = p + SIZEOF(k) ! 4 for 4-byte integer

k = 5

See Also