On 11 apr 2006, at 01:45, Dimitrios Apostolou wrote:
when a real number overflows the program halts with EInvalidOp error. How can I make the program behave the more standard way, where the variable gets the value "inf" and execution continues normally?
I'm not sure if overflow immediately results in infinity, I think first you get some denormalss. There's also nothing particularly standard about whether or not an exception is thrown when you have an FPU overflow, since all common FPU's I know about support both.
Anyway, you can mask overflow and related exceptions by doing this: uses math; ... SetExceptionMask([exDenormalized,exOverflow,exPrecision]); Jonas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal