Date: Wed, 21 Jan 2004 09:23:07 -0800
Reply-To: Seeliger.Curt@EPAMAIL.EPA.GOV
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Curt Seeliger <Seeliger.Curt@EPAMAIL.EPA.GOV>
Subject: Re: [gotcha] %MACRO Statement having parameters documented with
%* comment
Content-type: text/plain; charset=US-ASCII
> Despite the macro maven's post, I don't believe the tokenizing
> of * and %* comments is new in v9. It certainly happens in v8,
> and I think 6.12 too.
It does occur in v8.2. Furthermore, it isn't just macro comments that
have this effect:
%macro foo (
arg1=
, arg2= * This is comment for arg2, it has a comma;
);
Generates the same error message, as does
.arg2=;%* This comment is also, it seems, tokenized;
In answer to the original question, it seems this qualifies as both bad
and ugly, but circumventable if we remember that commas take precedence
over these comments in macro argument definitions (urk!)
%macro foo2(
arg1=
,arg2= %* This comment for arg2, is=hiding an argument;
);
%put arg1=&arg1;
%put arg2=&arg2;
%put is=&is;
%mend foo2;
Finally, with regard to commenting out mass quantities of code, I rely
on wrapping it in an uncalled macro, a la:
...good code ...
%macro bleah;
...skipped code /* and comments */
...%macro foo(will, be, undefined);... %mend foo;
...and more skipped code...
%mend bleah;
... more code to run ...
cur
--
Curt Seeliger, Data Ranger
CSC, EPA/WED contractor
seeliger.curt@epa.com