[fpc-pascal] Re: Range check error while evaluating constants
geneb
geneb at deltasoft.com
Tue Oct 30 20:48:00 CET 2012
On Tue, 30 Oct 2012, ik wrote:
> 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
That's good, because we love ignoring you.
g.
--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.diy-cockpits.org/coll - Go Collimated or Go Home.
Some people collect things for a hobby. Geeks collect hobbies.
ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://www.scarletdme.org - Get it _today_!
More information about the fpc-pascal
mailing list