Am 21.08.2008 um 11:04 schrieb Negm-Awad Amin:

Sometimes you see in source code something like this:
if( booleanVarOrExpression == YES )
(I think, Rentzsch does it that way, IIRC) and Ithink, that this is simply correct.

Oh, that is another discussion.
Bool != Boolean != bool, and sometimes that can introduce subtle errors if it's not only used to evaluate logical statements but by comparing values, especially to "YES", true and "TRUE".

In an large C++ Cross-Platform project I spotted some subtle problems, IIRC from assignment of an bool to an Boolean for an API that evaluated the values by comparison to "TRUE" or some code assigned it to ints, giving different values for true (1 vs. 0xFF vs. 0xFFFFFFFF). I don't know any more, fixed it, was glad my own coding practices don't leave room for that problems, moved on ;-)...

Regards,
        Tom_E
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to