[fpc-pascal] Re: Range check error while evaluating constants
ik
idokan at gmail.com
Tue Oct 30 17:20:14 CET 2012
On Tue, Oct 30, 2012 at 4:26 PM, ik <idokan at gmail.com> wrote:
> Hello,
>
> I have the following function:
>
> function OneToTwoComplement(AValue: QWord): QWord;
> begin
> Result := (AValue xor $FFFFFFFFFFFFFFFF) + 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 :
>
> function OneToTwoComplement(AValue: Int64): Int64;
> begin
> Result := (Abs(AValue) xor $FFFFFFFFFFFFFFFF) + 1;
> end;
>
>
> Thanks,
> Ido
How I love to be completely ignored
More information about the fpc-pascal
mailing list