Date: Fri, 3 Jun 2005 15:41:15 -0400
Reply-To: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Subject: Re: macro variable will not evaluate as numeric
Ryan Diver wrote:
> I'm new to macro coding and I'm trying to create a macro that will
> give me a 1/0 variable for every combination of two variables. The
> macro runs with out error messages, but all of the variables only
> have values of 0. It doesn't look like the condition for assigning a
> 1 is being met, but I can't figure out why. Any suggestions on the
> following code would be helpful.
Use %EVAL to have the logical resolution of a macro expression be replaced
into the source stream.
%LET X=0;
%PUT &X=0;
%PUT &X=1;
%PUT %EVAL(&X=0);
%PUT %EVAL(&X=1);
--
Richard A. DeVenezia
http://www.devenezia.com/
|