Previous Page | Next Page

Functions and CALL Routines

PTRLONGADD Function



Returns the pointer address as a character variable on 32-bit and 64-bit platforms.
Category: Special

Syntax
Arguments
Details
Examples

Syntax

PTRLONGADD(pointer<,amount>)


Arguments

pointer

is a character constant, variable, or expression that specifies the pointer address.

amount

is a numeric constant, variable, or expression that specifies the amount to add to the address.

Tip: amount can be a negative number.

Details

The PTRLONGADD function performs pointer arithmetic and returns a pointer address as a character string.


Examples

The following example returns the pointer address for the variable Z.

data _null_;
   x='ABCDE';
   y=ptrlongadd(addrlong(x),2);
   z=peekclong(y,1);
   put z=;
run;

The output from the SAS log is: z=C

Previous Page | Next Page | Top of Page