Checksum: 27579 Lines: 22 Path: utzoo!sq!msb From: msb@sq.uucp (Mark Brader) Date: Thu, 21-Jan-88 18:20:32 EST Message-ID: <1988Jan21.182032.17852@sq.uucp> Newsgroups: comp.lang.c Subject: Re: nested comments References: <13423@pyramid.pyramid.com> Reply-To: msb@sq.UUCP (Mark Brader) Organization: SoftQuad Inc., Toronto > 2. using nested comments, you are much less likely to suffer from > mistakes of the form: > a=b; /* <-- comment starts here > c=d; /* comment ends here --> */ This is easily covered by a compiler warning of the form Warning - /* found within comment - check for missing */ I have used either a B or C compiler that did this, but I don't remember where. Probably B at Waterloo. In my opinion "commenting out" seriously detracts from readability and should be avoided like the plague. There are other ways to preserve old versions of the code (SCCS, RCS, mv). If I really must do it temporarily, I use #if 0 or #ifdef NEVER. (Not #ifndef, of course. I recently got burned by not noticing that someone had coded #ifndef NEVER ... #else in a program I was modifying.) Mark Brader, SoftQuad Inc., Toronto, utzoo!sq!msb, msb@sq.com We can design a system that's proof against accident and stupidity; but we CAN'T design one that's proof against deliberate malice. -- a spaceship designer in Arthur C. Clarke's "2001: A Space Odyssey"