From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (71-38-157-25.ptld.qwest.net [71.38.157.25]) by hurricane.the-brannons.com (Postfix) with ESMTPSA id 2970577BBD for ; Thu, 27 Aug 2015 15:40:41 -0700 (PDT) From: Chris Brannon To: Edbrowse-dev@lists.the-brannons.com References: <20150727180442.eklhad@comcast.net> Date: Thu, 27 Aug 2015 15:42:48 -0700 In-Reply-To: <20150727180442.eklhad@comcast.net> (Karl Dahlke's message of "Thu, 27 Aug 2015 18:04:42 -0400") Message-ID: <87si74wdxz.fsf@mushroom.localdomain> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Edbrowse-dev] Bool X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2015 22:40:41 -0000 Karl Dahlke writes: > The lack of an internal bool type is perhaps > the worst omiission of the original C language. C99 has one. Quoting from Wikipedia [1]: Begin quote: Both C99 and C++ have a {boolean type} bool with constants true and false, but they behave differently. In C++, bool is a {built-in type} and a {reserved keyword}. In C99, a new keyword, _Bool, is introduced as the new boolean type. In many aspects, it behaves much like an unsigned int, but conversions from other integer types or pointers always constrained to 0 and 1. Other than for other unsigned types, and as one would expect for a boolean type, such a conversion is 0 if and only if the expression in question evaluates to 0 and it is 1 in all other cases. The header stdbool.h provides macros bool, true and false that are defined as _Bool, 1 and 0, respectively. End quote. [1] https://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B Yea, and the standards didst proliferate, sowing great confusion amongst the developers that dwelt upon the earth in those days. -- Chris