• 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: Core Data and unsigned integer types, why are there none?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data and unsigned integer types, why are there none?


  • Subject: Re: Core Data and unsigned integer types, why are there none?
  • From: Brett Powley <email@hidden>
  • Date: Wed, 23 Jul 2008 07:33:28 +1000


On 23/07/2008, at 6:41 AM, Sean McBride wrote:

Core Data provides several built-in types like string, date, etc. It
also has "integer 16", "integer 32", and "integer 64", all of which are
signed.


I'm curious why there are no unsigned versions. I assume there is some
reason.

If I were to hazard a guess, I'd say that it's because SQLite doesn't have unsigned versions (http://www.sqlite.org/datatype3.html)


How do the rest of you deal with this? If you need to model a uint32,
do you use CD's sint32 and risk sign extension problems, or do you use uint64?

If you know that your values aren't going to be greater than 2147483647, you could get away with using a uint32. Otherwise, I'd use a uint64.


Cheers,
Brett

_______________________________________________

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


References: 
 >Core Data and unsigned integer types, why are there none? (From: "Sean McBride" <email@hidden>)

  • Prev by Date: NSTask
  • Next by Date: Re: NSTask
  • Previous by thread: Core Data and unsigned integer types, why are there none?
  • Next by thread: NSTask
  • Index(es):
    • Date
    • Thread