ADDRLONG Function


ADDRLONG Function

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

Category: Special

Syntax

ADDRLONG ( variable )

Arguments

variable

  • specifies the variable name that points to the memory address.

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 



SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net