Nested Comments in C -- A recent experience
Jeff Sullivan, x4096 MS 4-2
jsulliva at cvbnet.UUCP
Wed Mar 14 05:49:54 AEST 1990
I have used at least one C compiler that allowed nested comments
with the use of a command line flag. The default was to not allow
them. I thought this was great for debugging since I could "comment
out" large blocks of code, comments and all. This was the only benefit
I could see in allowing nested comments.
Anyway, since then I have used #define's to comment out large blocks
of code (while debugging). For example:
#ifdef disabled
statement1; /* comment 1 */
....
statementn; /* comment n */
#endif
Obviously, you never #define disabled.
Works fo me!
-Jeff
More information about the Comp.lang.c
mailing list