Author: Heiner Marxen
Date: 07:48:04 03/20/04
Go up one level in this thread
On March 19, 2004 at 16:43:24, Pat King wrote: >On March 19, 2004 at 16:37:46, Pat King wrote: > >>Definitely 'unsigned long long', and definitely 64 bits there based on some >>things I've done with the debugger. If it's working for Cygwin, I guess for now >>I'll assume it's a mingw quirk. Thanks! > >Sheesh! I know what happens when I 'assume'. And I should know to read all the >responses before I respond to any of them! Dieter has it right -- I failed to >consider the type of the constant '1'. Per his example, the right way to do >things is > >unsigned long long I = (unsigned long long)1 << 35; // I'm guessing this is more >//portable than '1LLU'? You should make a typedef for your 64-bit type, like typedef unsigned long long U64_t; U64_t I = (U64_t)1 << 35; Yes, that way (with the cast) it is more portable than the suffix with LL, since you only need to get the typedef right. Another portability problem is the printf format for such values. Cheers, Heiner
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.