• 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
Re: printing NSUInteger in iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:

<https://twitter.com/gparker/status/401986923847114753>
[...] 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:

<https://twitter.com/gparker/status/377957260426616832>
[...] 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

References: 
 >printing NSUInteger in iOS (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: printing NSUInteger in iOS (From: Andy Lee <email@hidden>)
 >Re: printing NSUInteger in iOS (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: printing NSUInteger in iOS (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Any way to establish a constraint between width and height in IB?
  • Next by Date: Re: Xc5: Testing on a Jenkins slave
  • Previous by thread: Re: printing NSUInteger in iOS
  • Next by thread: Re: Any way to establish a constraint between width and height in IB?
  • Index(es):
    • Date
    • Thread