2009/6/25 Jonas Maebe <jonas.ma...@elis.ugent.be>: > > On 25 Jun 2009, at 19:58, Ruediger Hahn wrote: > >> I am just wondering if this is a bug: Can anyone tell me why I get a >> "range check error while evaluating constants" with the following simple >> program: >> >> <code> >> program Project1; >> >> const >> MyVar : UInt64 = $FFFFFFFFFFFFFFFF; // 4 x 2 Bytes or 4 Words >> >> begin >> end. >> </code> > > The reason is that $FFFFFFFFFFFFFFFF is parsed as an int64 by FPC. As a > result it equals -1, and -1 is not a valid uint64 value.
This warning is actually misleading as it makes one doubtfull about the correctness of the program( In my case I debugged the program to be sure that the "good" value was assigned). Best regards. -- Inoussa O. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal