V_setFPErrorHandling
FunctionDefine the action taken in the case of floating-point errors (Pascal/Delphi only).
Syntax Pascal/Delphiuses VecLib;
type V_fphand = 0..$1717;
procedure V_setFPErrorHandling( hand:V_fpHand );
DescriptionAs Pascal/Delphi does not handle floating-point errors through a user-definable function _matherr, as does C/C++, the function V_setFPErrorHandling is offered in OptiVec as a means for the programmer to exert at least some control over the actions to be taken in the case of floating-point errors occurring within OptiVec functions. A number of pre-defined constants fperrXXX is available for the construction of the desired error-handling mode:
 
ConstantValueMeaning
fperrIgnore0Ignore all floating-point errors: handle them silently, do not print a message, continue program execution
fperrNoteDOMAIN$0001Print a message in case of a DOMAIN error
fperrNoteSING$0002Print a message in case of a SING error
fperrNoteOVERFLOW$0003Print a message in case of an OVERFLOW error
fperrNoteTLOSS$0004Print a message in case of a TLOSS error
fperrAbortDOMAIN$0101Abort program in case of a DOMAIN error
fperrAbortSING$0202Abort program in case of a SING error
fperrAbortOVERFLOW$0303Abort program in case of an OVERFLOW error
fperrAbortTLOSS$0404Abort program in case of a TLOSS error
fperrDefaultHandling$0107Same as fperrAbortDOMAIN or fperrNoteSING or fperrNoteOVERFLOW
 
ExampleV_setFPErrorHandling( fperrAbortDOMAIN + fperrAbortSING + fperrAbortOVERFLOW + fperrNoteTLOSS );
In this example, program execution will be aborted (with the appropriate message) in the case of the most severe errors, DOMAIN and SING. In the case of OVERFLOW and TLOSS errors, a warning will be displayed, but program execution will be continued with default results set by the respective functions where the errors occur. The repeated occurrence of the same type of error within one and the same function will lead to only one message being generated. Subsequent errors will be treated silently.
Error handlingnone
Return valuenone
See alsoV_setIntErrorHandling,   V_setErrorEventFile,   V_noteError,   V_printErrorMsg

VectorLib Table of Contents  OptiVec home