• 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: unsigned 16 digit integer data type?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unsigned 16 digit integer data type?


  • Subject: Re: unsigned 16 digit integer data type?
  • From: Ben Dougall <email@hidden>
  • Date: Tue, 4 Nov 2003 20:04:30 +0000

On Tuesday, November 4, 2003, at 07:19 pm, Clark Cox wrote:


On Nov 04, 2003, at 13:40, Ben Dougall wrote:

is there a data type that'll store an unsigned 16 digit integer?

Do you mean 16-*bit*? or do you really mean 16 *digit*?

If it's the former, then unsigned short should do just fine. On the other hand, if it's the latter, then you can use unsigned long long.

the latter. thanks. i had tried long long but assumed it wasn't working because when i tried it the print out from NSLog was 0, even though it'd been set to a value. i've just tried it again and got a different incorrect result:

unsigned long long n;
n = 1234567890987654;
NSLog(@"%u", n);

which gives 287445 for some reason. how can you print a long long out? or have i set it up wrong?
also, out of interest, what's the maximum value of a unsigned long long?

thanks, ben.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: unsigned 16 digit integer data type?
      • From: Chris Ridd <email@hidden>
    • Re: unsigned 16 digit integer data type?
      • From: lbland <email@hidden>
    • Re: unsigned 16 digit integer data type?
      • From: Matt Gillette <email@hidden>
    • Re: unsigned 16 digit integer data type?
      • From: Creed Erickson <email@hidden>
    • Re: unsigned 16 digit integer data type?
      • From: Clark Cox <email@hidden>
References: 
 >Re: unsigned 16 digit integer data type? (From: Clark Cox <email@hidden>)

  • Prev by Date: Re: What's the best approach to integrating CVS support into an app?
  • Next by Date: Re: Detecting login/logout?
  • Previous by thread: Re: unsigned 16 digit integer data type?
  • Next by thread: Re: unsigned 16 digit integer data type?
  • Index(es):
    • Date
    • Thread