SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3

ADDRLONG Function

Returns the memory address of a character variable on 32-bit and 64-bit platforms

Category: Special

Syntax

ADDRLONG ( variable )

Arguments

variable

Details

The return value is a character variable that contains the binary representation of the pointer. To display this value, use the $HEX w . format to convert the binary value to its hexadecimal equivalent.

Note: If you used the ADDR function and defined an instance of the pointer as numeric by using a LENGTH statement in your program, substituting ADDR for ADDRLONG will fail because ADDRLONG requires a character argument.

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

Категории