[fpc-pascal]QWord vs. function Abs

Peter Vreman peter at freepascal.org
Wed Aug 20 16:56:22 CEST 2003


> > Hallo,
> > i'm newbie and maybe making something wrong.
> >
> > Small example for go32v2:
> >
> > var q1,q2:qword;
> > begin
> >   q1:=10;
> >   q2:=20;
> >   writeln(Abs(q1-q2));
> > end.
>
>I get runtime 215 with FPC 1.0.6 ...
>
>This probably means that FPC cannot support qwords in the abs function
>even though the documentation says "Any numerical type".

The problem is that there is a abs(int64) and abs(cardinal) and it can't 
decide which to take. An abs(qword) needs to be added


Peter





More information about the fpc-pascal mailing list