Date: Mon, 9 Jan 2006 07:31:14 -0800
Reply-To: Eric Hoogenboom <erichoogenboom@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Eric Hoogenboom <erichoogenboom@YAHOO.COM>
Organization: http://groups.google.com
Subject: Re: semicolon behind macro calls
Content-Type: text/plain; charset="iso-8859-1"
Rune,
Sometimes you build macros that generate parts of statements. In that
case, the semicolon may corrupt the code. See example below.
I prefer using the semicolon too, since it enables me to "turn it off "
by placing a * before the macro call.
%macro valdef (value, descr);
&value = "&descr"
%mend valdef;
proc format;
value zip %valdef(1000, Amsterdam)
%valdef(2000, Rotterdam)
%valdef(3000, Utrecht)
;
run;
/* You want errors? Here they are! */
proc format;
value zip %valdef(1000, Amsterdam);
%valdef(2000, Rotterdam);
%valdef(3000, Utrecht);
;
run;
Hth,
Eric
|