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

Peter Vreman peter at freepascal.org
Wed Apr 12 08:33:17 CEST 2006


> 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
>
> With excluding zero exception from SetExceptionMask(), it dows not turn on
> the exception (unless there is another way). In any event, division by
> zero
> should raise exception by default. Perhaps it is solved in some latest
> release?

Already fixed.






More information about the fpc-pascal mailing list