home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / n / newmat06.zip / BOOLEAN.H < prev    next >
C/C++ Source or Header  |  1992-06-07  |  504b  |  27 lines

  1. //$$ boolean.h                       Boolean class
  2.  
  3. #ifndef Boolean_LIB
  4. #define Boolean_LIB 0
  5.  
  6. class Boolean
  7. {
  8.    int value;
  9. public:
  10.    Boolean(const int b) { value = b ? 1 : 0; }
  11.    Boolean(const void* b) { value = b ? 1 : 0; }
  12.    Boolean() {}
  13.    operator int() const { return value; }
  14.    int operator!() const { return !value; }
  15.    FREE_CHECK(Boolean);
  16. };
  17.  
  18. #ifndef GXX
  19.    const Boolean TRUE = 1;
  20.    const Boolean FALSE = 0;
  21. #else
  22. #define FALSE 0
  23. #define TRUE 1
  24. #endif
  25.  
  26. #endif
  27.