Functions and CALL Routines |
Returns the memory address of a variable on 32-bit and 64-bit
platforms.
-
variable
-
specifies a variable.
The return value is a character string
that contains the binary representation of the address. To display this value,
use the $HEXw. format to convert the binary value
to its hexadecimal equivalent. If you store the result in a variable, that
variable should be a character variable with a length of at least eight characters
for portability. If you assign the result to a variable that does not yet
have a length defined, that variable is given a length of 20 characters.
The following example returns the pointer address for
the variable ITEM, and formats the value.
data characterlist;
item=6345;
x=addrlong(item);
put x $hex16.;
run;
The following line is written to the SAS log:
480063B020202020
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.