<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: BOOLing for Dollars</title>
	<atom:link href="http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/feed/" rel="self" type="application/rss+xml" />
	<link>http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/</link>
	<description>Coding under the close supervision of cats</description>
	<lastBuildDate>Fri, 19 Feb 2010 14:58:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Michael</title>
		<link>http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/comment-page-1/#comment-4415</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 23 Oct 2007 17:50:31 +0000</pubDate>
		<guid isPermaLink="false">http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/#comment-4415</guid>
		<description>When was this covered on Robot Chicken?  Nice Family Guy reference at the end.</description>
		<content:encoded><![CDATA[<p>When was this covered on Robot Chicken?  Nice Family Guy reference at the end.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc Charbonneau&#8217;s Blog &#187; Bit fields and BOOL</title>
		<link>http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/comment-page-1/#comment-3962</link>
		<dc:creator>Marc Charbonneau&#8217;s Blog &#187; Bit fields and BOOL</dc:creator>
		<pubDate>Tue, 02 Oct 2007 15:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/#comment-3962</guid>
		<description>[...] From Lap Cat Software Blog: A char type - e.g., char, signed char, unsigned char - is always one byte, i.e., sizeof(signed char) == 1, whereas in most implementations an int type is more than one byte. A byte standardly consists of 8 bits, or 12 nibbles. What happens to the extra bits if you convert an int into a BOOL? According to the wacky rules of C type conversion, the result is implementation-dependent. Many implementations simply throw away the highest bits. (Other implementations recycle them into information superhighway speed bumps.) As a consequence, itâ€™s possible that myIntVar != 0 &amp;&amp; (BOOL)myIntVar == NO. [...]</description>
		<content:encoded><![CDATA[<p>[...] From Lap Cat Software Blog: A char type &#8211; e.g., char, signed char, unsigned char &#8211; is always one byte, i.e., sizeof(signed char) == 1, whereas in most implementations an int type is more than one byte. A byte standardly consists of 8 bits, or 12 nibbles. What happens to the extra bits if you convert an int into a BOOL? According to the wacky rules of C type conversion, the result is implementation-dependent. Many implementations simply throw away the highest bits. (Other implementations recycle them into information superhighway speed bumps.) As a consequence, itâ€™s possible that myIntVar != 0 &#38;&#38; (BOOL)myIntVar == NO. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/comment-page-1/#comment-3953</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 02 Oct 2007 04:52:10 +0000</pubDate>
		<guid isPermaLink="false">http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/#comment-3953</guid>
		<description>AC: &quot;That just shows, that Apple should have stuck to int, the C way. BOOL is a stupid useless construct, that in the end just created problems.&quot;

Not really.  You still have the same problem with int if the result of the bitwise operation is larger than an int.  Using the result of a bitwise operation as a Boolean value is risky and needlessly terse at best.  Take the extra time to write what you really mean, as the author suggests.</description>
		<content:encoded><![CDATA[<p>AC: &#8220;That just shows, that Apple should have stuck to int, the C way. BOOL is a stupid useless construct, that in the end just created problems.&#8221;</p>
<p>Not really.  You still have the same problem with int if the result of the bitwise operation is larger than an int.  Using the result of a bitwise operation as a Boolean value is risky and needlessly terse at best.  Take the extra time to write what you really mean, as the author suggests.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous Coward</title>
		<link>http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/comment-page-1/#comment-3944</link>
		<dc:creator>Anonymous Coward</dc:creator>
		<pubDate>Mon, 01 Oct 2007 19:19:05 +0000</pubDate>
		<guid isPermaLink="false">http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/#comment-3944</guid>
		<description>That just shows, that Apple should have stuck to int, the C way. BOOL is a stupid useless construct, that in the end just created problems.</description>
		<content:encoded><![CDATA[<p>That just shows, that Apple should have stuck to int, the C way. BOOL is a stupid useless construct, that in the end just created problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hosey</title>
		<link>http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/comment-page-1/#comment-3926</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Sun, 30 Sep 2007 20:35:29 +0000</pubDate>
		<guid isPermaLink="false">http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/#comment-3926</guid>
		<description>&lt;blockquote&gt;A bitwise operator, in contrast, can return any bit field.&lt;/blockquote&gt;

I believe you meant bit mask here. A bit field is a specific pattern of structure members, like this:

unsigned reserved: 5;
unsigned hallLightSwitches: 2;
unsigned masterBedroomLightSwitch: 1;
unsigned childBedroomLightSwitch: 1;
unsigned guestBedroomLightSwitch: 1;
unsigned bathroomLightSwitch0: 1;
unsigned bathroomLightSwitch1: 1;
unsigned livingRoomLightSwitch: 1;
unsigned diningRoomLightSwitch: 1;
unsigned kitchenLightSwitch: 1;
unsigned garageLightSwitch: 1;</description>
		<content:encoded><![CDATA[<blockquote><p>A bitwise operator, in contrast, can return any bit field.</p></blockquote>
<p>I believe you meant bit mask here. A bit field is a specific pattern of structure members, like this:</p>
<p>unsigned reserved: 5;<br />
unsigned hallLightSwitches: 2;<br />
unsigned masterBedroomLightSwitch: 1;<br />
unsigned childBedroomLightSwitch: 1;<br />
unsigned guestBedroomLightSwitch: 1;<br />
unsigned bathroomLightSwitch0: 1;<br />
unsigned bathroomLightSwitch1: 1;<br />
unsigned livingRoomLightSwitch: 1;<br />
unsigned diningRoomLightSwitch: 1;<br />
unsigned kitchenLightSwitch: 1;<br />
unsigned garageLightSwitch: 1;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/comment-page-1/#comment-3925</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Sun, 30 Sep 2007 20:26:58 +0000</pubDate>
		<guid isPermaLink="false">http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/#comment-3925</guid>
		<description>You are correct. Nice name, by the way.</description>
		<content:encoded><![CDATA[<p>You are correct. Nice name, by the way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Bool</title>
		<link>http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/comment-page-1/#comment-3923</link>
		<dc:creator>Adrian Bool</dc:creator>
		<pubDate>Sun, 30 Sep 2007 18:53:01 +0000</pubDate>
		<guid isPermaLink="false">http://lapcatsoftware.com/blog/2007/09/30/booling-for-dollars/#comment-3923</guid>
		<description>1 Byte contains 2 Nibbles.  I guess the &#039;12&#039; is a typo?</description>
		<content:encoded><![CDATA[<p>1 Byte contains 2 Nibbles.  I guess the &#8216;12&#8242; is a typo?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
