Re: NSInteger and NSUInteger


Dave
 

Hi,

Thanks a lot for this - where did you find it?

Cheers
Dave

On 10 Jul 2017, at 11:54, Gerriet M. Denkmann <g@mdenkmann.de> wrote:


On 10 Jul 2017, at 16:37, Dave <dave@looktowindward.com> wrote:

I’m trying to use NSInteger and/or NSUInteger in a InitWithFormat statement, I’m using %ld as the specifier but this is producing warnings? Has this changed recently, because code that used to compile without warnings now cause warnings. What is the correct specifier to use for these types?
Formats for NS(U)Integer:
%t… (%td, %to, %tu %tx, %tX) for unsigned results NSUInteger
%z… (%zd, %zo, %zu %zx, %zX) for signed results NSInteger

Gerriet.



Join cocoa@apple-dev.groups.io to automatically receive all group messages.