Skip navigation.
 
mlRe: SInt64 and UInt64 problems with large values
FROM : Dave Rehring
DATE : Sat Apr 02 11:40:43 2005

On 4/2/05 1:00 AM, Ken Tozier at <email_removed> wrote:

> In lieu of using "long long" and "unsigned long long" in my code, I'm
> trying to use the more compact "SInt64" and "UInt64" both of which the
> compiler seems to be aware of , but when I try to give UInt64 a large
> constant hex value such as 0xFFFFFFFFFFFFFFFF, the complier complains
> that "integer constant is too large for "long" type." I searched for
> the definition of UInt64 and found it in MacTypes.h where it is defined
> as "typedef unsigned long long UInt64" so why does the compiler not
> allow the maximum hex value? Is there some undocumented upper limit to
> long long values?
>
> Thanks


You could try using the 'LL' postfix to indicate the number is a long long,
like this:

0xFFFFFFFFFFFFFFFFLL

Later,
--
David Rehring                  Psychos do not explode when light hits
VP of Research and Development them, no matter how crazy they are...
Atimi Software, Inc.
www.atimi.com                  And totally insane guy!

Related mailsAuthorDate
mlSInt64 and UInt64 problems with large values Ken Tozier Apr 2, 11:00
mlRe: SInt64 and UInt64 problems with large values Dave Rehring Apr 2, 11:40
mlRe: SInt64 and UInt64 problems with large values Ondra Cada Apr 2, 11:42
mlRe: SInt64 and UInt64 problems with large values Ken Tozier Apr 2, 17:20
mlRe: SInt64 and UInt64 problems with large values Scott Ribe Apr 3, 08:18
mlRe: SInt64 and UInt64 problems with large values Segher Boessenkool Apr 4, 10:45