• 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: Chris Ridd <email@hidden>
  • Date: Tue, 04 Nov 2003 22:10:21 +0000

On 4/11/03 8:04 pm, Ben Dougall <email@hidden> wrote:
> unsigned long long n;
> n = 1234567890987654;
> NSLog(@"%u", n);
>
> which gives 287445 for some reason. how can you print a long long out?

Try a format of "%llu". See 'man 3 printf'.

> or have i set it up wrong?
> also, out of interest, what's the maximum value of a unsigned long long?

Taking a look at <stdint.h>, I think you want UINTMAX_MAX.

Cheers,

Chris
_______________________________________________
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.

References: 
 >Re: unsigned 16 digit integer data type? (From: Ben Dougall <email@hidden>)

  • Prev by Date: Re: Super Newbie
  • Next by Date: Re: Freelance programming
  • Previous by thread: Re: unsigned 16 digit integer data type?
  • Next by thread: Plug-in & Framework
  • Index(es):
    • Date
    • Thread