• 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: NSUInteger question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUInteger question


  • Subject: Re: NSUInteger question
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 8 Apr 2008 18:19:54 -0700

On Apr 8, 2008, at 5:30 PM, Timothy Reaves wrote:

What advantage does NSUinteger have over uint32? I realize that on a 64 bit machine, it would be a uint64.

"Advantage"? None, really. It's a question of what you're trying to express -- do you want specifically a 32-bit unsigned integer, or do you want an unsigned integer that reflects the architecture's word size? For instance, there's no particular reason to limit NSArray's capacity to exactly 2^32 items all the time, so -count is defined as returning an NSUInteger -- 2^32 in 32-bit, or 2^64 in 64-bit. (Also consider the analogous size_t type.)



--Chris Nebel _______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSUInteger question
      • From: Chris Parker <email@hidden>
References: 
 >NSUInteger question (From: Timothy Reaves <email@hidden>)

  • Prev by Date: Re: NSUInteger question
  • Next by Date: Re: fileHFSCreatorCode & fileAttributesAtPath:traverseLink on app bundles
  • Previous by thread: Re: NSUInteger question
  • Next by thread: Re: NSUInteger question
  • Index(es):
    • Date
    • Thread