Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!snorkelwacker!think!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!ncar!ico!ism780c!news From: news@ism780c.isc.com (News system) Newsgroups: comp.lang.c Subject: Re: Re^2: Why nested comments not allowed? Message-ID: <39118@ism780c.isc.com> Date: 22 Feb 90 03:22:32 GMT References: <236100027@prism> <7330017@hpcllak.HP.COM> <1990Feb19.143619.17663@uncecs.edu> <1975.25e0048c@wums.wustl.edu> <1990Feb20.165353.14212@uncecs.edu> <2037.25e266bf@wums.wustl.edu> Reply-To: marv@ism780.UUCP (Marvin Rubenstein) Organization: Interactive Systems Corp., Santa Monica CA Lines: 26 In article <2037.25e266bf@wums.wustl.edu> bethge@wums.wustl.edu writes: >OK, I am not understanding you. Can you enlighten me? My question is, >*why* do you want nested comments? ... >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? Not that it is important but #if/#endif cannot be used to 'comment out' starting in the middle of a line and/or ending at the middle of a line. Actually, when I 'comment out' it is always for debugging. In almost every instance, I also 'comment in' a piece of code. The method I use (in Unix) is: cp foo.c foo.c.sav cc foo.c mv foo.c.sav foo.c This is extemely flexible and never results in shipping a 'completed' source file with what looks like executable code enclosed inside a comment or #if/#endif. Marv Rubinstein