defining a comment?

Karl Heuer karl at haddock.ima.isc.com
Tue Sep 27 03:55:09 AEST 1988


No, there is no legal way in ANSI C (or in K&R C, according to K&R) to "define
a comment".  Yes, you can trick the Reiser cpp into doing it anyway.  Except
for the Obfuscated C Contest, there is little reason to want to do so.

If you're trying to suppress code which contains comments, the appropriate
notation is "#if 0" ... "#endif".  (Or, if your preprocessor is so backward
as to not have #if, "#ifdef notdef" ... "#endif" will do.)  Generally, you
should use /* ... */ for natural language commentary, and #if to remove code.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list