next up previous
Next: astWcsMap - Create a WcsMap
Up: AST Function Descriptions
Previous: astVersion - Return the version of the AST library being used

   
astWatch - Identify a new error status variable for the AST library

Description:
This function allows a new error status variable to be accessed by the AST library when checking for and reporting error conditions.

By default, the library uses an internal integer error status which is set to an error value if an error occurs. Use of astWatch allows the internal error status to be replaced by an integer variable of your choosing, so that the AST library can share its error status directly with other code which uses the same error detection convention.

If an alternative error status variable is supplied, it is used by all related AST functions and macros (e.g. astOK, astStatus and astClearStatus).

Synopsis:
int *astWatch( int *status_address )

Parameters:
status_address
Address of an int whose value is to be used subsequently as the AST error status. If a NULL pointer is supplied, the AST library will revert to using its own internal error status.

Returned Value:
astWatch()
Address of the previous error status variable. This may later be passed back to astWatch to restore the previous behaviour of the library. (Note that on the first invocation of astWatch the returned value will be the address of the internal error status variable.)

Notes:
  • This function is not available in the FORTRAN 77 interface to the AST library.



next up previous
Next: astWcsMap - Create a WcsMap
Up: AST Function Descriptions
Previous: astVersion - Return the version of the AST library being used

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
30th April 2003
E-mail:ussc@star.rl.ac.uk

Copyright (C) 2003 Central Laboratory of the Research Councils