HP MLIB User's Guide Vol. 2 7th Ed.
Chapter 12 VMATH 805
Get, set, and clear error status for VMATH library functions vmlgeterrstatus, vmlseterrstatus, vmlclearerrstatus
Name vmlgeterrstatus, vmlseterrstatus, vmlclearerrstatus
Get, set, and clear error status for VMATH library functions
Purpose vmlgeterrstatus returns the current error status for VMATH subroutines.
vmlseterrstatus sets the new error status for VMATH subroutines according to
the err argument and returns the error status in effect at the time of the call.
vmlclearerrstatus sets the new error status for VMATH subroutines to
VML_STATUS_OK and returns the error status in effect at the time of the call.
The error status is specified by one of the parameters:
The err argument for vmlseterrstatus must have the value of one of the error
status parameters listed above. Each of these functions returns the value of an
error status parameter.
Example
The following checks whether a call to vdexp is free of errors:
INTEGER*4 err
CALL vmlclearerrstatus()
CALL vdexp(n, a, y)
err = vmlgeterrstatus()
IF (err == VML_STATUS_OK) THEN
// no errors
...
ELSE
// handle errors
...
END IF
NOTE The error status represents just one error condition, though more than
one may occur in a vector math function call. The floating-point
VML_STATUS_OK No errors
VML_STATUS_BADSIZE Array dimension is not positive
VML_STATUS_BADMEM NULL pointer argument
VML_STATUS_ERRDOM Function undefined for some array element
VML_STATUS_SING Singularity at some array element
VML_STATUS_OVERFLOW Floating-point overflow occurred
VML_STATUS_UNDERFLOW Floating-point underflow occurred