LOC (The GNU Fortran Compiler) (original) (raw)

Next: LOG — Natural logarithm function, Previous: LNBLNK — Index of the last non-blank character in a string, Up: Intrinsic Procedures [Contents][Index]


8.176 LOC — Returns the address of a variable

Synopsis:

RESULT = LOC(X)

Description:

LOC(X) returns the address of X as an integer.

Class:

Inquiry function

Arguments:

X Variable of any type.

Return value:

The return value is of type INTEGER, with a KINDcorresponding to the size (in bytes) of a memory address on the target machine.

Example:

program test_loc integer :: i real :: r i = loc(r) print *, i end program test_loc

Standard:

GNU extension