Date: Wed, 19 Sep 2001 13:13:08 +0100
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Roland <roland.rashleigh-berry@VIRGIN.NET>
Subject: Re: SAS Comments
Content-Type: text/plain; charset=us-ascii
> Explaination required..
> What is the difference in processing terms between comments such as...
> *** this is a comment*** ;
> /*** this is another comment ***/
> Also - are these treated differently by the macro compiler? I have
> seen comments such as..
> %*** this is a comment inside a macro ***;
> but what is the difference?
If you use /* then this won't cause you a problem */ Everything between
the slash-aster and the aster-slash will be ignored. But * this'll cause
you a problem ; because it contains a single unmatched quote and SAS
will expect it to be a comment and will scan through looking for the
quote to end it. /* */ is safer than using * ; .
In macro code you should use %* ; or /* */. Not * ; because in some
cases yu will be "pushing" SAS macro code only. You maybe want it all to
boil donw to a final string value. If you were to include * ; in your
macro code then this is SAS code rather than pure SAS macro code and so
it might cause a problem.
Certainly, if you have large blocks of comment in your SAS programs,
then you should get into the habit of using /* */ .