Fortran Library Reference

loc: Return the Address of an Object

This intrinsic function is called by:

k = loc( arg )

arg

Any type 

Input 

Variable or array  

Return value 

 

 

 

 

INTEGER*4 -or-

INTEGER*8

Output 

Address of arg

Returns an INTEGER*8 pointer when compiled to run in a 64-bit environment with -xarch=v9. See Note below.

Example: loc:


    INTEGER*4 k, loc
    real arg / 9.0 /
    k = loc( arg )
    write(*,*) k
    end


Note -

Programs compiled to run in a 64-bit environment should declare INTEGER*8 the variable receiving output from the loc() function.