home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: sparky!uunet!pmafire!mica.inel.gov!ux1!news.byu.edu!eff!sol.ctr.columbia.edu!usc!zaphod.mps.ohio-state.edu!wupost!sdd.hp.com!hpscit.sc.hp.com!scd.hp.com!hpscdm!hpscdc!kitchin
- From: kitchin@avo.hp.com (Bruce Kitchin)
- Subject: Re: Nested Comments in IBM C Set/2
- Message-ID: <BxtHoH.3Gy@scd.hp.com>
- Sender: news@scd.hp.com (News Account)
- Organization: Hewlett-Packard, Santa Clara Division
- X-Newsreader: TIN [version 1.1.4 PL6]
- References: <c9e-aw.721870314@volga.Berkeley.EDU>
- Date: Mon, 16 Nov 1992 16:26:40 GMT
- Lines: 20
-
- Rather than commenting out a section of code and the potential gotchas
- with nested comments, the recommended procedure is to bracket the
- section of code with #if 0 and #endif. Doing this, your comments
- and everything else is left unchanged just ignored by the compiler.
-
- E.G.
-
- #if 0
- some c code /* comment */
-
- /*******************
- *
- * another comment
- *
- *******************/
-
- more C code
-
- #endif
-
-