N100: Address of a Variable

Author(s): CDC Library: KERNLIB
Submitter: J.Zoll Submitted: 01.03.1968
Language: Fortran or Assembler or C Revised: 16.09.1991

The function LOCB returns the absolute address of the variable given as its argument.

LOCF returns the absolute address measured in terms of Fortran machine words.

Structure:

FUNCTION subprogram
User Entry Names: LOCF, LOCB

Usage:

    IAD = LOCB(X)
where X is the name of a variable of any type, or a name declared EXTERNAL in the calling program.
    IAD = LOCF(X)
where X is the name of a variable of type INTEGER or REAL.

Notes:

On CDC, LOCF is included in the FTN library, and documented in the Fortran manual.

On all machines LOCF is intended to measure the displacement between variables, thus for example for:

      COMMON /X/ M(12),A(4),LAST
      N = LOCF(LAST) - LOCF(M(1))
N will be set to contain 16 on all machines, whilst SPMquot LOCB(LAST) - LOCB(M(1)) " will give some multiple of 16.
tex2html_wrap_inline58

Michel Goossens Wed Jun 5 07:52:19 METDST 1996