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

NSString to Integer


  • Subject: NSString to Integer
  • From: Dave DeLong <email@hidden>
  • Date: Sat, 07 Mar 2009 17:55:34 -0700

Am I missing something?

	NSInteger d = [@"43253234929732" integerValue];
	NSLog(@"%qi, %d", d, (d%2));

2009-03-07 17:36:32.620 TestApp[37000:10b] 6442450943, -1073743928

I'm expecting it to output "43253234929732, 0"...

I'm on a 2GHz Macbook Unibody, so I'm expecting that d is a 64-bit integer.

Any help would be appreciated.

Thanks,

Dave
_______________________________________________

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: NSString to Integer
      • From: "Sean McBride" <email@hidden>
    • Re: NSString to Integer
      • From: Daniel Richman <email@hidden>
    • Re: NSString to Integer
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: NSArrayController -- will change selection?
  • Next by Date: Re: NSString to Integer
  • Previous by thread: Re: NSArrayController -- will change selection? --> tableView shouldSelectRow invoked twice
  • Next by thread: Re: NSString to Integer
  • Index(es):
    • Date
    • Thread