home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol144 / nesting.c < prev    next >
Encoding:
C/C++ Source or Header  |  1984-04-29  |  353 b   |  48 lines

  1. #define A
  2. #define C
  3.  
  4. main()
  5.  
  6. {
  7.  
  8.  
  9. #ifdef    A
  10.  
  11. printf("A is defined\n");
  12.  
  13.  
  14. #ifdef    B
  15.  
  16. printf("A and B are  defined\n");
  17.  
  18. #else    /*B*/
  19.  
  20. printf("A is defined, but B is not\n");
  21.  
  22. #ifdef    C
  23.  
  24. printf("C is defined\n");
  25.  
  26.  
  27. #else    /*C*/
  28.  
  29. printf("C is NOT defined\n");
  30.  
  31. #endif    /*C*/
  32.  
  33. #endif    /*B*/
  34.  
  35.  
  36. #endif    /*A*/
  37.  
  38.  
  39. #ifdef    B
  40.  
  41. printf("B are  defined\n");
  42.  
  43. #endif    /*B*/
  44.  
  45.  
  46.  
  47. }
  48.