home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / POLYEDIT.LZH / LIB / ASSERT.H < prev    next >
C/C++ Source or Header  |  1996-02-26  |  293b  |  14 lines

  1. #if 0
  2. #ifndef    NDEBUG
  3.  
  4. #define    assert(EXP)    {if(!(EXP)){printf("Assertion failed: %s, file %s, line %d\n",#EXP,__FILE__,__LINE__);exit(1);}}
  5.  
  6. #else
  7.  
  8. #define    assert(exp)
  9.  
  10. #endif
  11. #else
  12. #define    assert(EXP)    if(!(EXP))ExecError("内部エラー %s (%s %d行目)",#EXP,__FILE__,__LINE__)
  13. #endif
  14.