From: Chris Brannon <chris@the-brannons.com>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] Bool
Date: Thu, 27 Aug 2015 15:42:48 -0700 [thread overview]
Message-ID: <87si74wdxz.fsf@mushroom.localdomain> (raw)
In-Reply-To: <20150727180442.eklhad@comcast.net> (Karl Dahlke's message of "Thu, 27 Aug 2015 18:04:42 -0400")
Karl Dahlke <eklhad@comcast.net> 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
next prev parent reply other threads:[~2015-08-27 22:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 22:04 Karl Dahlke
2015-08-27 22:42 ` Chris Brannon [this message]
2015-08-28 4:21 ` Kevin Carhart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87si74wdxz.fsf@mushroom.localdomain \
--to=chris@the-brannons.com \
--cc=Edbrowse-dev@lists.the-brannons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).