home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l200 / 2.ddi / ASSERT.H next >
Encoding:
C/C++ Source or Header  |  1986-06-27  |  346 b   |  24 lines

  1. /*
  2.  * assert.h
  3.  *
  4.  * defines the assert macro.
  5.  *
  6.  * Copyright (C) Microsoft Corporation, 1984, 1985, 1986
  7.  *
  8.  */
  9.  
  10. #ifndef NDEBUG
  11.  
  12. #define assert(exp)    { \
  13.     if (!(exp)) { \
  14.         fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__, __LINE__); \
  15.         exit(1); \
  16.         } \
  17.     }
  18.  
  19. #else
  20.  
  21. #define assert(exp)
  22.  
  23. #endif /* NDEBUG */
  24.