Re: How tell tell if an NSNumber was initialized from a float or int?
Re: How tell tell if an NSNumber was initialized from a float or int?
- Subject: Re: How tell tell if an NSNumber was initialized from a float or int?
- From: "James W. Walker" <email@hidden>
- Date: Sat, 26 Jun 2010 19:58:07 -0700
On Jun 26, 2010, at 11:51 AM, Quincey Morris wrote:
> 1. Unless this has changed recently, [NSNumber numberWithInt: 1] and [NSNumber numberWithBool: YES] both return the same (singleton) object, as do [NSNumber numberWithInt: 0] and [NSNumber numberWithBool: NO].
This is not true in Snow Leopard, at least. One can distinguish 0, 1 from false, true using CFGetTypeID.
_______________________________________________
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