• 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: Kyle Sluder <email@hidden>
  • Date: Mon, 28 Jun 2010 06:19:48 -0700

On Mon, Jun 28, 2010 at 6:06 AM, Kyle Sluder <email@hidden> wrote:
> Again, no. This tells you if CFNumber has decided to store the number as a float. It does *not* tell you if the number was originally created from a float, and analogues do not exist for other scalar types.

Tell you what, I'm gonna stop posting to the list within the 10
minutes after I first wake up. Then maybe I wouldn't have overlooked
CFNumberGetType. But the documentation for that function is very clear
that you cannot use this to do what the OP asked for:

"The type specified in the call to CFNumberCreate is not necessarily
preserved when a new CFNumber object is created—it uses whatever
internal storage type the creation function deems appropriate."

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: How tell tell if an NSNumber was initialized from a float or int?
      • From: vincent habchi <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: Manfred Schwind <email@hidden>)
 >Re: How tell tell if an NSNumber was initialized from a float or int? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: How tell tell if an NSNumber was initialized from a float or int?
  • Next by Date: Re: Smooth OpenGL animation possible, even if main thread blocks?
  • 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