Document Number: WG14 N702/J11 97-065 C9X Revision Proposal ===================== Title: Boolean as a new type, revision 2 Author: Frank Farance Author Affiliation: Farance Inc. Postal Address: 555 Main Street, New York, NY, 10044-0150, USA E-mail Address: frank@farance.com Telephone Number: +1 212 486 4700 Fax Number: +1 212 759 1605 Sponsor: NCITS/J11 Date: 1997-05-23 Proposal Category: __ Editorial change/non-normative contribution __ Correction X_ New feature __ Addition to obsolescent feature list __ Addition to Future Directions __ Other (please specify) ______________________________ Area of Standard Affected: __ Environment X_ Language __ Preprocessor __ Library __ Macro/typedef/tag name __ Function __ Header Prior Art: C++ Target Audience: C programmers Related Documents (if any): Proposal Attached: X_ Yes __ No, but what's your interest? This proposal is for adding boolean as a new type, not just a macro for an existing integer type. At the Kona meeting, we approved a Boolean type with standards words to be supplied. The following are the changes to the standard. In subclause 6.1.1, Keywords, add the keyword "bool". In subclause 6.1.2.5, Types, add after paragraph #1 the paragraph: An object declared as type "bool" is large enough to store the values "true" and "false" and shall have values 1 and 0, respectively. In subclause 6.1.2.5, Types, change the first sentence in paragraphs #10 and #16 from: The type "char", ... to The type "bool", the type "char", ... In subclause 6.2.1, Characters and integers: Change the title to ``Boolean values, characters, and integers''. Change the first sentence from A "char" to A "bool", a "char" Add paragraph #3: When a value with integral type is demonted to a "bool", the result is "false" if the value is 0, and "true" otherwise.