TITLE: Booleans, the final edition RESPONSE: maxtal@physics.su.OZ.AU (John Max Skaller) The committee just adopted a new data type -- bool -- as part of the core language. RESPONSE: dag@control.lth.se (Dag Bruck) "bool" is a unique signed integral type, just as the "wchar_t" is a unique unsigned type. There are two built-in constants of this type: "true" and "false". Operator "++" is defined for "bool"; it always sets its operand to "true". This operator is an anachronism, and its use is deprecated. A "bool" value may be converted to "int" by promotion, taking "true" to one and "false" to zero. A numeric or pointer value is automatically converted to "bool" when needed. When converting a numeric or pointer value to "bool", a zero value becomes "false"; a non-zero value becomes "true". The built-in operators "&&", "||", and "!" are changed to take "bool" values as their arguments and return "bool" results. The relational operators "<", ">", "<=", ">=", "==", and "!=" are changed to yield a "bool" result. Expressions used as conditions in "if", "for", "while", or "do" statements or as the first operand of a "?:" expression, are automatically converted to "bool". RESPONSE: jamshid (Jamshid Afshar), 14 Dec 93, SES We should probably probably start using `bool', `true' and `false' in any new code we write. globals.h would have to change to something like: #ifndef COMPILER_IMPLEMENTS_BOOL typedef int bool; const bool true = 1; const bool false = 0; #endif typedef bool boolean; #define TRUE true #define FALSE false [ I concur. I think we should switch over to this new convention after the frameworks merge has stablized (February?). What do the rest of you think? -adc ]