Previous Page | Next Page

Functions and CALL Routines

ADDRLONG Function



Returns the memory address of a variable on 32-bit and 64-bit platforms.
Category: Special

Syntax
Arguments
Details
Examples

Syntax

ADDRLONG(variable)


Arguments

variable

specifies a variable.


Details

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.


Examples

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

Previous Page | Next Page | Top of Page