next up previous contents
Next: THE VAL_ FUNCTIONS
Up: INTRODUCTION
Previous: Propagation of Bad Data

The STATUS Argument

Each VAL_ and VEC_ routine takes a standard integer STATUS variable as its final argument. In normal use, this STATUS variable should be set to SAI__OK when the routine is invoked, otherwise it will return immediately without action.3

On exit, the STATUS value will still be set to SAI__OK unless a numerical error has occurred, in which case it will be set to an appropriate error code (Appendix [*]). PRIMDAT error codes may be tested to detect when a particular numerical error has occurred, and may also be used to report these errors (using the ADAM ERR_ routines for instance).

Note that routines in this package do not report errors themselves. This is partly an efficiency consideration. In many circumstances, the automatic generation of a bad value will itself be an adequate response to a numerical error and, in such cases, the STATUS variable may simply be reset to SAI__OK and processing can continue.


next up previous contents
Next: THE VAL_ FUNCTIONS
Up: INTRODUCTION
Previous: Propagation of Bad Data

PRIMDAT --- Processing of Primitive Numerical Data
Starlink User Note 39
R F Warren-Smith
28 February 1995
E-mail:ussc@star.rl.ac.uk

Copyright © 2009 Science and Technology Facilities Council