NSUInteger = unsigned int?

  • In the "String Programming Guide" under "String Format Specifiers",
    it says "%u or %U" for unsigned 32 bit integers. Is this what
    NSUInteger is typedef'd to? Or do I need "%qu" instead?
  • Further down in the document (In the "Platform Dependencies" section), it says you should use %ld or %lx for NSInteger and cast it to a long, and %lu or %lx for an NSUInteger and cast it to an unsigned long.

    NSUInteger is typedef'd to either an unsigned int or an unsigned long, depending on your platform.

    Cheers,

    Dave

    On Nov 14, 2010, at 8:33 AM, William Squires wrote:

    > In the "String Programming Guide" under "String Format Specifiers", it says "%u or %U" for unsigned 32 bit integers. Is this what NSUInteger is typedef'd to? Or do I need "%qu" instead?
  • On Nov 14, 2010, at 8:33 AM, William Squires wrote:

    > In the "String Programming Guide" under "String Format Specifiers", it says "%u or %U" for unsigned 32 bit integers. Is this what NSUInteger is typedef'd to? Or do I need "%qu" instead?

    NSUInteger is 32-bit for 32-bit architecture, 64-bit for 64-bit architecture.

    --
    Scott Ribe
    <scott_ribe...>
    http://www.elevated-dev.com/
    (303) 722-0567 voice
previous month november 2010 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
Go to today