home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / TURBOC_1.LZH / INCLUDE / ASSERT.H < prev    next >
Text File  |  1990-03-02  |  609b  |  38 lines

  1. /*      ASSERT.H
  2.  
  3.         Diagnostic Includes
  4.  
  5.         Copyright (c) Borland International 1988
  6.         All Rights Reserved.
  7. */
  8.  
  9.  
  10.  
  11. #if !defined( __ASSERT )
  12. #define __ASSERT
  13.  
  14. #if     !defined(__STDLIB)
  15. #include <stdlib.h>
  16. #endif
  17.  
  18. #if !defined(NDEBUG)
  19.  
  20. #define assert( expr )\
  21.     if ( !( expr ) )\
  22.     {\
  23.         fprintf( stderr, "\nAssertion failed: %s, file %s, line %d\n",\
  24.                  #expr, __FILE__, __LINE__ );\
  25.         abort();\
  26.     }
  27.  
  28. #else
  29.  
  30. #define assert( expr )
  31.  
  32. #endif
  33.  
  34.  
  35. #endif
  36.  
  37. /************************************************************************/
  38.