next up previous 211
Next: Using the Error Message Service for ADAM system programming
Up: Using ERR within ADAM applications
Previous: Reserved token STATUS


Returning the status to the environment

ADAM applications are Fortran subroutines which are called by the software environment. An ADAM application has the schematic form
      SUBROUTINE APPLIC( STATUS )

      ...

      <application code>

      ...

      END

where the argument STATUS is given as SAI__OK. When the application ends and returns control to the environment, the final value of STATUS will reflect whether or not the application finished on an error condition. This provides the environment with a status to be associated with the application as a whole. The exit status of the application can be used by the environment to decide what to do next. If a status value other than SAI__OK is returned to the ADAM environment, then any pending error messages are output. Applications which fail should therefore return an error status. This recommendation does not, in fact, differ from that for any other subroutine obeying the inherited status strategy.



next up previous 211
Next: Using the Error Message Service for ADAM system programming
Up: Using ERR within ADAM applications
Previous: Reserved token STATUS

MERS (MSG and ERR) Message and Error Reporting Systems
Starlink User Note 104
P C T Rees
A J Chipperfield
22 October 2001
E-mail:ussc@star.rl.ac.uk

Copyright © 2001 Council for the Central Laboratory of the Research Councils