next up previous 211
Next: Changes and New Features in Version 1.4
Up: MERS (MSG and ERR) Message and Error Reporting Systems
Previous: Operating system specific routines


Calculating Globally Unique Error Codes

Starlink facility error codes will normally be generated by the Starlink MESSGEN utility on UNIX.

This section presents an alternative method for calculating compatible error status codes for subroutine libraries. In order to be used effectively, it requires a Fortran compiler capable of four byte integer representation. If this is not the case, then the status values generated will not be globally unique.

The error codes are calculated using the equation:


\begin{displaymath}
CODE \,= \, 134250498 \,\, + \,\, 65536\times <fac> \,\, + \,\, 8\times <mes>
\end{displaymath} (1)

Here, <mes> is the message number (in the range 1 to 4095) assigned to the error condition by the author of the subroutine library, and <fac> is the facility number (in the range 1 to 2047) allocated to this subroutine library. Developers wishing to have facility numbers allocated to subroutine libraries should contact the Starlink Software Librarian (i.e. ussc@star.bnsc.rl.ac.uk).



next up previous 211
Next: Changes and New Features in Version 1.4
Up: MERS (MSG and ERR) Message and Error Reporting Systems
Previous: Operating system specific routines

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