XL Fortran for AIX 8.1

Language Reference

+-------------------------------IBM Extension--------------------------------+


LOC(X)

Returns the address of X that can then be used to define an integer POINTER.

X
is the data object whose address you want to find. It must not be an undefined or disassociated pointer or a parameter. If it is a zero-sized array, it must be storage associated with a non-zero-sized storage sequence. If it is an array section, the storage of the array section must be contiguous.

Class

Inquiry function

Result Type and Attributes

The result is of type INTEGER(4) in 32-bit mode and of type INTEGER(8) in 64-bit mode.

Result Value

The result is the address of the data object, or, if X is a pointer, the address of the associated target. The result is undefined if the argument is not valid.

Examples

INTEGER A,B
POINTER (P,I)
 
P=LOC(A)
P=LOC(B)
END

+----------------------------End of IBM Extension----------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]