Nested Comments in C -- A recent experience
Matt Saucier
msau at wpi.wpi.edu
Tue Mar 13 14:55:22 AEST 1990
IMO, a source level debugger is great for spotting problems like this...
"Whoops - it skipped a statement - Oh, I don't believe it... I forgot to close
the comment!" Anyways, I've had similar problems, but, like someone else
mentioned - some compilers yell about a variable being used before it was
given a value.
To Mr HS. If you say that C compilers that allow, or can allow, nested
comments are not C compilers, then you are very nieve. There are times,
in which nested comments are a plus; Although I don't use the nested comment
method (I use #ifdef DEBUG #endif (or whatever)), I know a lot of people who
do use them. They use TurboC. And if you don't call that a C compiler,
maybe you should open your eyes. TC has an option to turn on nested comments;
it's default is no nested comments. Yes, if the option is on, it is not
technically, ANSI (nor K&R) C. But who EVER ports C code while debugging?
I don't think ANYONE would be foolish enough to leave nested comments in
a completed, running program (actually, I could be wrong, but they are very
foolish indeed) Nested comments, IMHO, are provided as an option for those
who have a certian style of debugging. Just because a compiler offers an
extra FEATURE doesn't mean that it's not a C compiler - it's just helpful.
--
Internet: msau at wpi.wpi.edu \\ Koyannisqatsi: n. 1. crazy life 2. life in
BITNET: msau at wpi.bitnet \\ turmoil 3. life disintegrating 4. life
UUCP: uunet!wpi.wpi.edu!msau \\ out of balance 5. a state of life that
Compuserve: 72371,3101 WPI BOX 1346 \\ calls for another way of living.
More information about the Comp.lang.c
mailing list