home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os2 / programm / 6473 < prev    next >
Encoding:
Text File  |  1992-11-16  |  979 b   |  33 lines

  1. Newsgroups: comp.os.os2.programmer
  2. 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
  3. From: kitchin@avo.hp.com (Bruce Kitchin)
  4. Subject: Re: Nested Comments in IBM C Set/2
  5. Message-ID: <BxtHoH.3Gy@scd.hp.com>
  6. Sender: news@scd.hp.com (News Account)
  7. Organization: Hewlett-Packard, Santa Clara Division
  8. X-Newsreader: TIN [version 1.1.4 PL6]
  9. References: <c9e-aw.721870314@volga.Berkeley.EDU>
  10. Date: Mon, 16 Nov 1992 16:26:40 GMT
  11. Lines: 20
  12.  
  13. Rather than commenting out a section of code and the potential gotchas
  14. with nested comments, the recommended procedure is to bracket the
  15. section of code with #if 0 and #endif.  Doing this, your comments
  16. and everything else is left unchanged just ignored by the compiler.
  17.  
  18. E.G.
  19.  
  20. #if 0
  21.    some c code /* comment */
  22.  
  23.   /*******************
  24.    *
  25.    * another comment
  26.    *
  27.    *******************/
  28.  
  29.   more C code
  30.  
  31. #endif
  32.  
  33.