Functions and CALL Routines

ADDRLONG Function



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

Syntax
Arguments
Details
Examples

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 $HEXw. 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.   [cautionend]


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

space
Previous Page | Next Page | Top of Page