(ref.doc)ark 021293
Next ellis 061293
Prev: fjh 251193
Up: Usenet
From: [email protected] (Andrew Koenig) (Note:
Koenig)
Newsgroups: comp.std.c++
Subject: Re: New boolean type!?!
Date: 2 Dec 93 21:05:41 GMT
The proposal was by me and Dag Bruck. It was accepted by about a 2:1
vote, which mirrors surprisingly accurately how I feel about the
proposal -- I think it's a good idea but not overwhelmingly so.
Very briefly,
the type is called bool
the bool values are called true and false
converting numeric or pointer type to bool takes 0 to false
and anything else to true
bool promotes to int, taking false to 0 and true to 1
places such as `if' and `while' statements, as well as
the operands of && || ! (but not & | ~) are now converted
to bool
all operators that conceptulally return truth values return bool
compound operators such as &= are *not* defined for bool left argument
--
--Andrew Koenig
[email protected]
automatically generated by info2www version 1.2.2.8