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 / MACRO1.PP < prev    next >
Text File  |  1991-11-15  |  405b  |  21 lines

  1. /*
  2.     Taken from the C puzzle book.
  3. */
  4.  
  5. #define PR(format,value) printf("value = %format\t",(value))
  6. #define NL putchar(n)
  7.  
  8. #define PRINT1(f,x1)  PR(f,x1), NL
  9. #define PRINT2(f,x1,x2) PR(f,x1), PRINT1(f,x2)
  10. #define PRINT3(f,x1,x2,x3) PR(f,x1), PRINT2(f,x2,x3)
  11. #define PRINT4(f,x1,x2,x3,x4) PR(f,x1), PRINT3(f,x2,x3,x4)
  12.  
  13.  
  14. PRINT1(d,1);
  15.  
  16. PRINT2(d,1,2);
  17.  
  18. PRINT3(d,1,2,3);
  19.  
  20. PRINT4(d,1,2,3,4);
  21.