This one bit me today

Chip Salzenberg chip at ateng.com
Wed Oct 25 00:29:35 AEST 1989


According to austin at bucsf.bu.edu (Austin Ziegler):
>In Pascal, one of the nicest features for debugging is nested comments.

Of course, let us not forget that Pascal has two kinds of comment
delimiters, (* *) and { }, and that nesting { { } } or (* (* *) *) doesn't
work.  C has only /* */.

>This is provided as a *Debugging* feature *only* in Turbo C.  Nowhere does
>Borland state that you should use that feature in normal programming.

Nested comments are a _bug_, not a feature, Borland apologists
notwithstanding.

>I *have* found the need to comment it out because I am not fully
>acquainted with all of the features of the preprocessor commands.

Ignorance of the language is no excuse.  All that's needed is:

	#if 0
		/* never do this */
		system("delete *.*");
	#endif

-- 
You may redistribute this article only to those who may freely do likewise.
Chip Salzenberg at A T Engineering;  <chip at ateng.com> or <uunet!ateng!chip>
"'Why do we post to Usenet?'  Naturally, the answer is, 'To get a response.'"
                        -- Brad "Flame Me" Templeton



More information about the Comp.lang.c mailing list