Re: NSInteger
Re: NSInteger
- Subject: Re: NSInteger
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 3 Sep 2008 09:26:15 -0600
On Sep 3, 2008, at 8:58 AM, D.K. Johnston wrote:
I'm a bit puzzled by the new NSInteger type. Should I be using this
now instead of int? (I'm just as puzzled by NSUInteger, of course.)
Yes! Otherwise you'll run into problems if you try to compile your
application for 64-bit architectures. For example, if your code
compares a returned integer to NSNotFound, the value of NSNotFound
changed in 64-bit and is a number that is too large to fit into a 32-
bit space, so the comparison will not work correctly, and you'll
experience some breakage.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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: | |
| >NSInteger (From: "D.K. Johnston" <email@hidden>) |