Re: NSUInteger in for-loop?
Re: NSUInteger in for-loop?
- Subject: Re: NSUInteger in for-loop?
- From: Alex Reynolds <email@hidden>
- Date: Sun, 14 Sep 2008 21:44:28 -0700
The %lu with casting seems to run into the same issue as %u:
...
2008-09-14 21:43:07.241 NSUIntTest[19779:10b] NSUInteger: 2
2008-09-14 21:43:07.259 NSUIntTest[19779:10b] NSUInteger: 1
2008-09-14 21:43:07.260 NSUIntTest[19779:10b] NSUInteger: 0
2008-09-14 21:43:07.261 NSUIntTest[19779:10b] NSUInteger: 4294967295
2008-09-14 21:43:07.262 NSUIntTest[19779:10b] NSUInteger: 4294967294
...
Interesting.
-Alex
On Sep 14, 2008, at 9:38 PM, j o a r wrote:
NSUInteger runs from 0 -> NSUIntegerMax.
This is how you print a NSUInteger:
NSLog(@"NSUInteger: %lu", ((unsigned long)counter));
j o a r
_______________________________________________
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