fpc/tests/webtbs/tw29912.pp
2016-03-29 09:50:42 +00:00

22 lines
253 B
ObjectPascal

program Project1;
{$mode objfpc}{$H+}
{$R+,Q+,S+,T+}
var
x,y,z:integer;
begin
x:=0;
z:=0;
// all ok
y:=Int64(x-1);
writeln(y);
// all ok
y:=Int64(z);
writeln(y);
// arithmetic overflow
y:=Int64(x-1)*Int64(z);
writeln(y);
end.