POINTER - Compaq Fortran

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

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.

Rules and Behavior

The following are pointer rules and behavior:

The following are pointee rules and behavior:

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: LOC, MALLOC, FREE

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