home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os2 / programm / 6599 < prev    next >
Encoding:
Text File  |  1992-11-21  |  1.1 KB  |  51 lines

  1. Path: sparky!uunet!news.claremont.edu!ucivax!ofa123!Lynn.Nash!f107.n207.z1.fidonet.org
  2. From: Lynn.Nash@f107.n207.z1.fidonet.org
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Nested Comments In Ibm C
  5. X-Sender: newtout 0.02 Nov 17 1992
  6. Message-ID: <n0edet@ofa123.fidonet.org>
  7. Date: 18 Nov 92  18:49:06
  8. Lines: 41
  9.  
  10. CF>Organization: University of California, at Berkeley
  11. CF>From: c9e-aw@volga (Claudio Fahey)
  12. CF>Message-ID: c9e-aw.721870314@volga.berkeley.edu
  13. CF>Newsgroups: comp.os.os2.programmer
  14.  
  15. CF>Does anybody know if the IBM C Set/2 compiler can be
  16. CF>setup to support nested comments?  It sure is a pain
  17. CF>uncommenting my comments when I want to comment a large
  18. CF>section of code.
  19.  
  20. Really, Try this
  21.  
  22. int main(void)
  23. {
  24.  
  25.    int x;
  26.    int y;
  27.  
  28.    /* imbedded comment in main loop */
  29.    for (x = 0; x < 10; x++) {
  30.       DoSomething(x);
  31.    }
  32.  
  33. #if 0
  34.    /* here is a piece of code disabled using the preprocessor */
  35.    for (y = 0; y < 10; y++) {
  36.       DoSomthingElse(y);
  37.    }
  38. #endif
  39.  
  40.    return 0;
  41. )
  42.  
  43. Should work unless you have figured out how to define zero.
  44. cheers
  45.    --Lynn Nash
  46.  
  47. ___
  48.  * MR/2 1.31 NR * BETA TESTERS WHO LIE! On the next Geraldo...
  49.  
  50. --- Maximus/2 2.01wb
  51.