Path: utzoo!attcan!uunet!dino!ux1.cso.uiuc.edu!brutus.cs.uiuc.edu!wuarchive!wums2!bethge From: bethge@wums.wustl.edu Newsgroups: comp.lang.c Subject: Re: Re^2: Why nested comments not allowed? Message-ID: <2037.25e266bf@wums.wustl.edu> Date: 21 Feb 90 16:00:31 GMT References: <236100027@prism> <7330017@hpcllak.HP.COM> <1990Feb19.143619.17663@uncecs.edu> <1975.25e0048c@wums.wustl.edu> <1990Feb20.165353.14212@uncecs.edu> Lines: 41 In article <1990Feb20.165353.14212@uncecs.edu>, utoddl@uncecs.edu (Todd M. Lewis) writes: > You have quite precisely missed my point. It was even in quotes. Briefly: > 1) "comment out a section..." Use comments. > 2) "compile if x {not} defined" Use #if{n}def/#endif. > See the difference? In particular, I did not say that nested comments are > the better way to suppress the compilation of a section of code. If it's a > comment it isn't code! The notion of conditionally compiling comments is > a bit off the mark, IMHO. Comments are never compiled--nothing conditional > about that. Lexed or parsed maybe, but not compiled. > It isn't a religious issue. It is a semantic issue--on two levels, no less. > On the lower level, what I said is not what you thought I meant. On the > higher level, #ifdef/#endif and nested comments are not the same although > the end result may be the same. OK, I am not understanding you. Can you enlighten me? My question is, *why* do you want nested comments? I asked this question in a previous posting, to which no one responded. As I said then, the only use I can think of is to suppress the compilation of a section of code (containing comments), by turning it into a comment. This is what I understand to be the meaning of the phrase "comment out a section...". I know that the *mechanisms* of #ifdef/#endif and nested comments are different. But if the *purpose* is the same, and the *end result* is the same, why are both needed? Do you object the the introduction of a bogus undefined identifier, as in #ifdef YES_COMPILE_THIS_HERE_BIT_OF_HACKWORK . . . #endif or what? Or is there really some other use for nested comments? If there is, I don't want to remain ignorant of it. No sarcasm intended. I really am seeking enlightenment. _______________________________________________________________________ Paul H. Bethge bethge@wums.wustl.edu Biochemistry, Box 8231 bethge@wums.bitnet Washington University St. Louis, MO 63110 314-362-3354