Re: Unsigned Long Long
Re: Unsigned Long Long
- Subject: Re: Unsigned Long Long
- From: Sherm Pendley <email@hidden>
- Date: Wed, 12 May 2004 21:15:01 -0400
On May 12, 2004, at 5:39 PM, Fritz Anderson wrote:
An unsigned long long is simply a 64-bit integer, in the range 0 ..
(2^64)-1.
Just to pick nits - the C99 standard requires it to be a minimum of
64-bits wide, but allows it to be bigger. Always use sizeof() if
knowing the exact storage size is important to you.
You do arithmetic on it the same way you'd do it on any other
integer. Divide by 1024 to get KB.
Bit-shifting is faster than division:
long long kb = b << 10;
Assuming of course that GCC doesn't optimize division by a constant
power of 2 into a bit-shift on its own.
sherm--
_______________________________________________
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.