[fpc-pascal] Division by Zero - not raised exception

Florian Klaempfl florian at freepascal.org
Sun Apr 16 10:23:06 CEST 2006

Sasa Zeman wrote:
>>> FPC 2.0.2 do not rasie exception on integer/floats division by Zero,
> which
>>> is suitable for calucaltion I currently developing. Instead, division
>>> return infinity:
>>> writeln(1/0) -> +inf
>>> writeln(1.0/0) -> +inf
>> Already fixed.
> Unfortunatelly, bug still persists when division is performed with
> constants.
> Please take a look bug report #5018 for details.

We don't consider this as a bug, it's for delphi compatibility reasons.
These expressions are evaluated at compile time, so it's something
differnt. If you want to get an error, compile with -Cr.

More information about the fpc-pascal mailing list