Date: Tue, 20 Jul 2010 14:52:02 -0400
Reply-To: Michael Raithel <michaelraithel@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Michael Raithel <michaelraithel@WESTAT.COM>
Subject: Re: Thoughts on nested comments?
In-Reply-To: <941871A13165C2418EC144ACB212BDB0018BF871@dshsmxoly1504g.dshs.wa.lcl>
Content-Type: text/plain; charset="utf-8"
Dear SAS-L-ers,
Dan posted the following:
> Mark,
>
> Over the years due to the lack of nested block comments, I have used
> "macro comments" to achieve this result. I only use /* and */ to
> create block text comments, not to comment out code. If I want to
> comment code, I use something like
>
> %MACRO COMMENT;
> <Code to be commented out>
> %MEND COMMENT;
>
> And never calling the cSometimes I will use a more descriptive name if
> I have multiple sections (nested or otherwise) to comment out. I don't
> know of any particular downside to this (other than the need to process
> the macros and cluttering up macro space). So, for the most part, I
> don't particularly miss the lack of an official nested comment
> construct. But your mileage may vary. I would be interested in
> others' comments about using macros for "commenting" code.
>
Dan, yea; I learned the Macro comment trick from Paul Grant--ex-NESUG Co-Chair, Ex-SUGI Chair, and now SAS Consultant extraordinaire--many, many, many years ago with this seminal paper:
The 'SKIP' Statement
http://www.nesug.org/Proceedings/nesug97/coders/grant1.pdf
I have been using the (Macro) 'SKIP' statement to skip; er... comment out SAS code during development, ever since.
All of this is by way of letting you and Sterling know you are certainly not alone in using this clever construct which has filled in the gap that Mark is now endeavoring to plug.
%MACRO SKIP;
All, best of luck in all your SAS endeavors!
%MEND SKIP;
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Michael A. Raithel
"The man who wrote the book on performance"
E-mail: MichaelRaithel@westat.com
Author: Tuning SAS Applications in the MVS Environment
Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition
http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172
Author: The Complete Guide to SAS Indexes
http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
It's only a matter of inches, but skipping gets me just that
much closer to heaven. - Jessi Lane Adams
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++