• 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: 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

  • Follow-Ups:
    • Re: printing NSUInteger in iOS
      • From: Andy Lee <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>)

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