[code language=”delphi”]
procedure TForm1.Button1Click(Sender: TObject);
var
a, b: integer;
begin
a := strtoint(Edit1.Text);
try
try
b := a div a;
except
on e: Exception do
b := 0;
end;
finally
Edit3.Text := inttostr(b);
end;
end;
[/code]