Re: printing NSUInteger in iOS
Re: printing NSUInteger in iOS
- Subject: Re: printing NSUInteger in iOS
- From: Jens Alfke <email@hidden>
- Date: Sun, 17 Nov 2013 15:42:53 -0800
%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.”
(Whereas ‘z’ is the same thing but for size_t or a corresponding signed type. Which ought to be the same thing as ’t’, so I don’t understand why both exist, and why ‘%zu’ produces a compile error on iOS.)
—Jens |
_______________________________________________
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