Re: omitting zero-test
Re: omitting zero-test
On Thu, Feb 20, 2003 at 12:14:53PM -0500, Niko Matsakis wrote:
>
It might have something to do with the fact that
>
>
(2 & 2) == 2
>
>
((2 & 2) != 0) == 1
>
>
i.e., if some code relies on ticketOrder having a 0 or 1 then it
>
would do the wrong thing if the mask is testing bits other than 1.
I always thought the problem was that BOOL is actually a char, and if
the bit being tested was higher than bit 8, it'd get truncated. This
has caught me several times too.
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.