Xref: utzoo comp.lang.c++:4841 comp.lang.c:22325
Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!cit-vax!wen-king
From: wen-king@cit-vax.Caltech.Edu (King Su)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: Time to standardize "true" and "false"
Message-ID: <12070@cit-vax.Caltech.Edu>
Date: 27 Sep 89 12:54:15 GMT
References: <13730@well.UUCP> <9464@attctc.Dallas.TX.US> <895@cirrusl.UUCP> <1044@m3.mfci.UUCP> <393@cpsolv.UUCP>
Reply-To: wen-king@cit-vax.UUCP (Wen-King Su)
Organization: California Institute of Technology
Lines: 17

In article <393@cpsolv.UUCP> rhg@cpsolv.uucp (Richard H. Gumpertz) writes:
>The biggest advantage of a built-in boolean type would be that casts TO it
if sizeof(source) is bigger than sizeof(bool).  Also, (bool)X & (bool)Y would
equivalent to && for type bool except that both operands would be evaluated.

Why not just do:

#define bool(a) (!!(a))

Then just use bool(X) whenever you wanted to use (bool)X.

-- 
/*------------------------------------------------------------------------*\
| Wen-King Su  wen-king@vlsi.caltech.edu  Caltech Corp of Cosmic Engineers |
\*------------------------------------------------------------------------*/