On Apr 19, 2016, at 2:20 PM, Alex Zavatone <z...@mac.com> wrote: > > Considering its use at the language level, would values of nil and 0 result > as NO and every other value of 1 or > == YES?
No, when it's a char, there are 254 values which are not == to either NO or YES. This can be a pretty severe trap for the unaware. (Especially the part where multiples of 256 can become == NO...) When it's a proper C99'ish bool, then all values are cast to bool at assignment, and so it is always == either 0 or 1. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com