Date: Thu, 3 Mar 2011 10:31:20 -0500
Reply-To: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject: Re: eval the expression in variable
why a function?
%let d=5+2;
data _null_;
x=&d;
put x=;
run;
Gerhard
On Thu, 3 Mar 2011 15:46:42 +0530, vaibhav wadhera
<vaibhavwadhera@GMAIL.COM> wrote:
>Hi Clark
>
>We can use the Sum function to get the same.
>
>On Thu, Mar 3, 2011 at 3:41 PM, Clark An <kuhasu@126.com> wrote:
>
>> d="5+2";
>>
>> if d is a macro variable,
>> we can get 7 by the aid of %eval
>> but is there a function in data step can help to do this?
>> s=function(d);/*s=7*/?
>>
>> TIA
>>
>
>
>
>--
>Thanks & Regards
>
>Vaibhav wadhera
|