Functions and CALL Routines |
Returns the pointer address as a character variable on 32-bit
and 64-bit platforms.
PTRLONGADD(pointer<,amount>)
|
-
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. |
The PTRLONGADD function performs pointer
arithmetic and returns a pointer address as a character string.
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
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.