Re: [fpc-pascal] Range check error while evaluating constants

2012-10-30 Thread ik
On Tue, Oct 30, 2012 at 10:10 PM, Mark Morgan Lloyd wrote: > ik wrote: >> >> Hello, >> >> I have the following function: >> >> function OneToTwoComplement(AValue: QWord): QWord; >> begin >> Result := (AValue xor $) + 1; >> end; >> >> What am I missing here that makes the compiler

Re: [fpc-pascal] Range check error while evaluating constants

2012-10-30 Thread Mark Morgan Lloyd
ik wrote: Hello, I have the following function: function OneToTwoComplement(AValue: QWord): QWord; begin Result := (AValue xor $) + 1; end; What am I missing here that makes the compiler complain about "Range check error while evaluating constants" ? Why doesn't it complain o

Re: [fpc-pascal] Range check error while evaluating constants

2012-10-30 Thread Peter
On 30/10/12 14:26, ik wrote: Hello, I have the following function: function OneToTwoComplement(AValue: QWord): QWord; begin Result := (AValue xor $) + 1; end; What am I missing here that makes the compiler complain about "Range check error while evaluating constants" ? Why d

[fpc-pascal] Range check error while evaluating constants

2012-10-30 Thread ik
Hello, I have the following function: function OneToTwoComplement(AValue: QWord): QWord; begin Result := (AValue xor $) + 1; end; What am I missing here that makes the compiler complain about "Range check error while evaluating constants" ? Why doesn't it complain on : functio