home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / proglc / zoo141_c.lzh / DEBUG.H < prev    next >
C/C++ Source or Header  |  1987-02-07  |  617b  |  31 lines

  1. /* debug.h */
  2. /* 
  3. The contents of this file are hereby released to the public domain.
  4.  
  5.                            -- Rahul Dhesi 1986/11/14
  6.  
  7. defines conditional function calls 
  8.  
  9. Usage:  The statement
  10.  
  11.    debug((printf("y = %d\n", y)))
  12.  
  13. may be placed anywhere where two or more statements could be used.  It will 
  14. print the value of y at that point.
  15.  
  16. Conditional compilation:
  17.  
  18.    if DEBUG is defined
  19.       define the macro debug(X) to execute statement X
  20.    else
  21.       define the macro debug(X) to be null
  22.    endif
  23. */
  24.  
  25. #ifdef DEBUG
  26. #define  debug(x)    x;
  27. #else
  28. #define  debug(x)
  29. #endif
  30.  
  31.