nested comments (was Re: This one bit me today)
Alan J Rosenthal
flaps at dgp.toronto.edu
Wed Oct 25 02:02:30 AEST 1989
>>>> Such compilers are *broken*, at least as C compilers.
>>>
>>>I don't get it. Are you saying that a C compiler that allows the option
>>>of nested comments is *broken*? I believe Turbo C has a nested comments
>>>option.
>>
>>Yes, please re-read my reply.
austin at bucsf.bu.edu (Austin Ziegler) writes:
>As a rule, I do not use nested comments in C, but I *have* found the need to
>comment it out because I am not fully acquainted with all of the features of
>the preprocessor commands.
Aha!!! Finally we see what is going on. Some people who do not know C very
well are being told that nested comments are good. Well, let me set them right
on this score:
-> nested comments are bad in C. Not only bad, in fact non-existant.
Now Turbo C seems to pander to pascal programmers, and provides an option to
enable nested comments (only for debugging!). They have to document this
option, of course. So, they have chosen to document this option rather than
to document correct use of "#if 0" ... "#endif".
-> This is bad.
ajr
--
Vs encr vf n xvaq bs frk, gura n chapu va gur zbhgu vf n xvaq bs gnyxvat.
More information about the Comp.lang.c
mailing list