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?
Content-Type: text/plain; charset="utf-8"
Dan posted the following:
> 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
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.
All, best of luck in all your SAS endeavors!
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"
Author: Tuning SAS Applications in the MVS Environment
Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition
Author: The Complete Guide to SAS Indexes
It's only a matter of inches, but skipping gets me just that
much closer to heaven. - Jessi Lane Adams