Path: utzoo!attcan!uunet!ogicse!uwm.edu!rutgers!mcnc!ecsvax.uncecs.edu!utoddl From: utoddl@uncecs.edu (Todd M. Lewis) Newsgroups: comp.lang.c Subject: Re: Re^2: Why nested comments not allowed? Message-ID: <1990Feb20.165353.14212@uncecs.edu> Date: 20 Feb 90 16:53:53 GMT References: <236100027@prism> <7330017@hpcllak.HP.COM> <1990Feb19.143619.17663@uncecs.edu> <1975.25e0048c@wums.wustl.edu> Organization: UNC Educational Computing Service Lines: 36 [Sorry, folks. I started this, now I'll try to end it. Sure...] In article <1975.25e0048c@wums.wustl.edu> bethge@wums.wustl.edu writes: >In article <1990Feb19.143619.17663@uncecs.edu>, utoddl@uncecs.edu >(Todd M. Lewis) writes: >> ... Because we've been doing it that way for eons doesn't mean it's a >> "better way." Of course, without true nested comments it's the >> only way, but that, too, is beside the point. #ifdef/#endif is better > ^^^^^^^^^^^^^^^^^^^^^^^ >> for conditionally compiling code fragments. Nested comments are the > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> better way to "comment out a section of code that contains comments." >> Your own words--it should be obvious. I am continually amazed that [lots of wonderful logic deleted] > >This apprears to be a religious issue. It is not the least bit "obvious" to >me that "nested comments are the better way" to suppress the compilation of >a section of code. What is this, if not conditional compilation? 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. _____ | Todd M. Lewis Disclaimer: If you want my employer's ||\/| utoddl@ecsvax.uncecs.edu ideas, you'll have to || || utoddl@ecsvax.bitnet, @unc.bitnet _buy_ them. | || utoddl@sun1.mscre.unc.edu |___ ("Prgrms wtht cmmnts r lk sntncs wtht vwls." --TML)