Re: Unnecessary Boolean Warning
Re: Unnecessary Boolean Warning
- Subject: Re: Unnecessary Boolean Warning
- From: Dale Miller <email@hidden>
- Date: Wed, 03 Aug 2011 00:53:02 -0700
You are correct. I get that wrong a lot. But that reinforces my point.
A decent language (IMHO) would not confuse things with two different
"and's". And my typo "'1001'" for "OX1001" probably was a Freudian
slip because of my fervent dislike of C's syntax for hex numbers. Or
maybe it was too late into the wee hours. - Dale Miller
On Aug 2, 2011, at 23:43 , Charles Srstka wrote:
On Aug 2, 2011, at 7:57 PM, Dale Miller wrote:
It is disconcerting that if A = 0x'0110' and B = '1001' then A & B
returns true but A && B returns 0, so "if (A && B)' is executed, the
'true' leg is not taken
Don’t you have that backwards? Assuming B was supposed to be hex, i.e.
0x1001, then A & B would be 0, whereas A && B would be true.
Charles
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden