From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function SetExceptionMask(const Mask: TArithmeticExceptionMask): TArithmeticExceptionMask;


extern DELPHI_PACKAGE TArithmeticExceptionMask __fastcall SetExceptionMask(const TArithmeticExceptionMask Mask);


Type Visibility Source Unit Parent
function public
System.Math System.Math


Sets the exception mask for the floating-point exceptions.

You typically need to mask and unmask exceptions when you are interacting with external code such as TWebBrowser, OLEDB, .NET assembly, ActiveX controls, and OpenGL.

Call SetExceptionMask to specify the types of exceptions the floating-point-number hardware generates. Any element set in this mask prevents the floating-point-number hardware from raising the corresponding type of exception. Instead, the floating-point-number hardware returns its best attempt at a value – often NaN, Infinity, or NegInfinity. The value depends on the operation.

SetExceptionMask returns the previous exception mask.

SetExceptionMask is platform independent.

See Also