LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 2001, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 19 Sep 2001 09:53:58 -0700
Reply-To:     Cassell.David@EPAMAIL.EPA.GOV
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "David L. Cassell" <Cassell.David@EPAMAIL.EPA.GOV>
Subject:      Re: SAS Comments
Content-type: text/plain; charset=us-ascii

John Whittington wrote: > Roland, there I have to disagree with you. An unmatched quote within a > *...; type of comment is no problem. After the asterisk, SAS treats EVERY > character it finds as being part of the comment until it hits the next > semicolon - hence, it is perfectly safe to put ANYTHING in a *...; type of > comment EXCEPT for a semicolon.

I agree. But let me point out one analogue where this is an issue. An unmatched quote inside a %*...; comment can wreak untold havoc. Unmatched quotes inside these macro comments are picked out by the compiler, while unmatched quotes inside *...; comments are not. I was badly bitten by this just a couple months ago when I typed up a few paragraphs of documentation inside a large macro and used a contraction without noticing. Ouch.

> As for the relative 'safety' of the two approaches, I again have to > disagree with you. Like many other people I know, I virtually never use > the /*...*/ type of comment, because of the serious potential hazard caused > by their 'un-nestability'. Rightly or wrongly, /*...*/ is often used to > 'comment out' blocks of code during testing/development, and that can > result in chaos if there are /*...*/ comments within the block of code in > question.

A good point, but I have an alternative that I use instead.

I prefer to use the "%MACRO SKIP" routine. I find it is safer to block out large chunks of code like this:

%MACRO SKIP; the code I wanted to block out so it would not be executed or even examined by the compiler... %MEND SKIP;

It was recommended in SAS-L a long time ago, and is a nifty tool to keep in one's bag o' tricks...

David -- David Cassell, CSC Senior computing specialist mathematical statistician

Back to: Top of message | Previous page | Main SAS-L page