Re: printing NSUInteger in iOS
Re: printing NSUInteger in iOS
- Subject: Re: printing NSUInteger in iOS
- From: Andy Lee <email@hidden>
- Date: Mon, 18 Nov 2013 00:28:27 -0500
On Nov 17, 2013, at 5:06 PM, Gerriet M. Denkmann < email@hidden> wrote: Excellent. Though "currently" sounds like: "might stop to work any minute".
If it helps Greg Parker followed up with:
[...] No standard guarantees they will work; they just happen to work on Apple's current platforms and architectures.
On Nov 17, 2013, at 6:42 PM, Jens Alfke <email@hidden> wrote:
%zd, %tu, %tx (signed, unsigned, hex) currently format NSInteger and NSUInteger with no warnings.
Looks as though you can use %td as well, which makes all three cases consistent: just use a ’t’ size prefix.
If you’re curious: The ’t’ specifies "that a following d, o, u, x, or X conversion specifier applies to a ptrdiff_t or the corresponding unsigned integer type argument.”
And:
[...] NS[U]Integer happen to be the "corresponding [un]signed integer type" on all four OSX and iOS architectures.
(I just happened to have the tweets open in my browser.)
--Andy
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden