• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How tell tell if an NSNumber was initialized from a float or int?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How tell tell if an NSNumber was initialized from a float or int? (From: Jaime Magiera <email@hidden>)
 >Re: How tell tell if an NSNumber was initialized from a float or int? (From: Kyle Sluder <email@hidden>)
 >Re: How tell tell if an NSNumber was initialized from a float or int? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: C arrays as __block variables
  • Next by Date: Re: C arrays as __block variables
  • Previous by thread: Re: How tell tell if an NSNumber was initialized from a float or int?
  • Next by thread: Re: How tell tell if an NSNumber was initialized from a float or int?
  • Index(es):
    • Date
    • Thread