Re: unsigned 16 digit integer data type?
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.