Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-06

SetExceptionMask

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Richard Ward
> Did you try disabling floating point exceptions? A lot of C code assumes that floating point exceptions are disabled (since that's what the C library does on startup). Aha. And how do I do that ?
uses
 math;

SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision])

------

We do this to get Mac applications to work as well - putting this line of code in early. Is there a place (in general) where we can set these exception masks back safely or just have to set localized places where you check something in particular? - R