home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 357_01 / cstar1.exe / DEFINE.PP < prev    next >
Text File  |  1991-11-15  |  355b  |  12 lines

  1. /* From C Puzzle Book page 23 */
  2. #define PR(format,value) printf("value=%format\t",(value))
  3. #define NL putchar('\n')
  4.  
  5. #define PRINT1(f,x1) PR(f,x1), NL
  6. #define PRINT2(f,x1,x2) PR(f,x1), PRINT1(f,x2)
  7. #define PRINT3(f,x1,x2,x3) PR(f,x1), PRINT2(f,x2,x3)
  8. #define PRINT4(f,x1,x2,x3,x4) PR(f,x1), PRINT3(f,x2,x3,x4)
  9.  
  10. PRINT1(d,5);
  11. PRINT4(d,1,2,3,4);
  12.