G Calculating Globally Unique Error Codes

Starlink facility error codes will normally be generated by the Starlink MESSGEN utility on UNIX (see SUN/185).

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:

CODE = 134250498 + 65536× < fac > + 8× < mes > (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).