System.Math.SetExceptionMask

From RAD Studio API Documentation
Revision as of 12:14, 20 February 2015 by AndreyKuchukov (talk | contribs) (RS-58373)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Delphi

function SetExceptionMask(const Mask: TArithmeticExceptionMask): TArithmeticExceptionMask;

C++

extern DELPHI_PACKAGE TArithmeticExceptionMask __fastcall SetExceptionMask(const TArithmeticExceptionMask Mask);

Properties

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

Description

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