[fpc-pascal] RunError(215) occurs only in win 64 bit, not win 32 bit
Dennis
dec12 at avidsoft.com.hk
Wed Jan 24 10:38:51 CET 2018
When I compiled the following simply programs using Lazarus 1.8 fpc
3.0.4 Win 64, run it, it will throws RunError(215) Arithmetic overflow
error.
However, if I compile and run the same in Lazarus 1.8 fpc 3.0.4 win 32,
it won't raise the RunError (215).
Why???
program test64bit;
{$mode objfpc}{$H+}
{$OVERFLOWCHECKS ON}
var
LW1, LW2 : array[false..true] of LongWord;
c : currency;
aBoolean : Boolean;
begin
LW1[false] := 5;
LW1[true] := 5;
LW2[false] := 10;
LW2[true] := 10;
c := 10;
aBoolean := (LW1[true] + LW1[false]) - (LW2[false]+LW2[true]) > c ;
Writeln('if compiled in 64 bit, a RunError(215) will have occurred
and it will not reach this line');
readln;
end.
More information about the fpc-pascal
mailing list