Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site tove.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!umcp-cs!tove!mark
From: mark@tove.UUCP (Mark Weiser)
Newsgroups: net.lang.c
Subject: Re: Re: Standardization questions -- nested comments
Message-ID: <14@tove.UUCP>
Date: Sat, 13-Oct-84 22:08:41 EDT
Article-I.D.: tove.14
Posted: Sat Oct 13 22:08:41 1984
Date-Received: Mon, 15-Oct-84 01:39:38 EDT
References: <12931@sri-arpa.UUCP>
Organization: U of Maryland, Laboratory for Parallel Computation, C.P., MD
Lines: 23

> From:  William LeFebvre 
> 
> > Has anyone considered making /* and */ nest properly, so that one could
> > comment out commented code??
> 
> The best and most widely accepted way to prevent a block of code from
> being compiled while still leaving the code in the file is as follows:
> 
> #ifdef notdef

The serious problem with no nesting is that whether or not a comment
will work or net depends on the context.  The #ifdef method is
ugly, and only works for sure if you never use comments or keep them
real short.  If there is any chance that a comment may be lurking
around, one cannot just stick a comment string into a C file without
checking an arbitrarily large amount of context information to see
if there is another comment that it will mung.  This sort of global
checking is just the sort of things I hate to do, but computers are
good at.  Let's hear it for compiler support for nested comments.
-- 
Spoken: Mark Weiser 	ARPA:	mark@maryland
CSNet:	mark@umcp-cs 	UUCP:	{seismo,allegra}!umcp-cs!mark
U.S.: Computer Science Dept., University of Maryland, College Park, MD 20742