System.Math.ClearExceptions
Delphi
procedure ClearExceptions(RaisePending: Boolean; ExceptionFlags: TArithmeticExceptions);
C++
extern DELPHI_PACKAGE void __fastcall ClearExceptions(bool RaisePending = true, TArithmeticExceptions ExceptionFlags = (TArithmeticExceptions() << TArithmeticException::exInvalidOp << TArithmeticException::exZeroDivide << TArithmeticException::exOverflow ));
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Math.pas System.Math.hpp |
System.Math | System.Math |
Description
Clears floating-point number's cumulative exception flags and raises cumulative floating-point number's exceptions if RaisePending
is True
.
Some floating-point hardware (for example ARM) set the cumulative floating-point exception status bits, but the hardware does not raise floating-point exceptions.
If RaisePending
is True
, any pending floating point exceptions specified by ExceptionFlags
cause the corresponding error to be raised. ClearExceptions clears the cumulative exception flags specified by ExceptionFlags
in the floating-point number hardware.
By default, RaisePending
is True
.
ClearExceptions with RaisePending
is True
is the same as RaiseExceptions.
If ExceptionFlags
is empty, ClearExceptions does not do anything.
ClearExceptions is platform independent.
By default, ExceptionFlags
is DefaultExceptionFlags
:
DefaultExceptionFlags = [ TArithmeticException.exInvalidOp, TArithmeticException.exZeroDivide, TArithmeticException.exOverflow];