• 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: NSString to Integer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString to Integer


  • Subject: Re: NSString to Integer
  • From: Daniel Richman <email@hidden>
  • Date: Sat, 07 Mar 2009 17:33:20 -0800

Thanks for correcting that. I'd forgotten that long long existed.

--Daniel Richman


Kyle Sluder wrote:
On Sat, Mar 7, 2009 at 8:13 PM, Daniel Richman
<email@hidden> wrote:
But your app could be running on a 32 bit only machine, so 64 bit is not a
bet to make if you want this program to work on unknown machines. Use
-doubleValue to get at least 64 bits, guaranteed.

!!! -doubleValue returns a double, which is a floating point number. This is *not* what he wants -- he wants a 64-bit integer. -longLongValue gives you a 64-bit integer on any platform. -intValue gives you a 32-bit integer on any platform, and -integerValue gives you a native-sized integer on any platform.

The 64-bit transition guide has more information:
http://developer.apple.com/DOCUMENTATION/Darwin/Conceptual/64bitPorting/intro/chapter_1_section_1.html#//apple_ref/doc/uid/TP40001064-CH205-TPXREF101

--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


References: 
 >NSString to Integer (From: Dave DeLong <email@hidden>)
 >Re: NSString to Integer (From: Daniel Richman <email@hidden>)
 >Re: NSString to Integer (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Cleaner daemon managed by Launchd?
  • Next by Date: Re: NSString to Integer
  • Previous by thread: Re: NSString to Integer
  • Next by thread: Re: NSString to Integer
  • Index(es):
    • Date
    • Thread