Xref: utzoo comp.lang.c++:4822 comp.lang.c:22277
Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!amgraf!cpsolv!rhg
From: rhg@cpsolv.UUCP (Richard H. Gumpertz)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: Time to standardize "true" and "false"
Message-ID: <393@cpsolv.UUCP>
Date: 27 Sep 89 02:27:40 GMT
References: <13730@well.UUCP> <9464@attctc.Dallas.TX.US> <895@cirrusl.UUCP> <1044@m3.mfci.UUCP>
Reply-To: rhg@cpsolv.uucp (Richard H. Gumpertz)
Organization: Computer Problem Solving, Leawood, Kansas
Lines: 10

The biggest advantage of a built-in boolean type would be that casts TO it
would test for zero/non-zero rather than just trucating the high-order bits
if sizeof(source) is bigger than sizeof(bool).  Also, (bool)X & (bool)Y would
do "right" thing even if X was 4 and Y was 32.  In other words, & would be
equivalent to && for type bool except that both operands would be evaluated.
-- 
==========================================================================
| Richard H. Gumpertz:                        ...uunet!amgraf!cpsolv!rhg |
| Computer Problem Solving, 8905 Mohwak Lane, Leawood, Kansas 66206-1749 |
==========================================================================