fpc/tests/tbs/tb0262.pp
florian 6b9f52b4f2 + couple of { %OPT=-CE } to tests added
git-svn-id: branches/laksen/riscv_new@39641 -
2018-08-19 12:42:26 +00:00

28 lines
435 B
ObjectPascal

{ %OPT=-CE }
{ Old file: tbs0305.pp }
{ Finally is not handled correctly after inputting 0 }
{$mode objfpc}
uses
sysutils;
var i,j,k:real;
const except_called : boolean = false;
begin
i:=100;
j:=0;
try
k:=i/j;
writeln(k:5:3);
except
k:=0;
writeln('Illegal Input');
except_called:=true;
end;
if not except_called then
begin
Writeln('Error in except handling');
Halt(1);
end;
end.