ADAM provides subroutine libraries which make various facilities available to application programmers. Each library has a Facility Name which is a mnemonic used to identify it. For example, the Facility Name for one of the libraries in the Starlink Data System is `DAT'. The ways in which these Facility Names impact upon the programmer are:
- Routine Names
Each routine in a library has a name of the form:
where `fac' is the Facility Name, and `name' is the specific routine name. By using this convention, name clashes between different libraries and applications can be avoided. It also becomes possible to identify the ADAM calls in a piece of code.
- Error Symbols
The error codes which can be returned via the STATUS argument are given symbolic names using Fortran PARAMETER statements. These names are made available to a program by including a file with logical name `fac_ERR', as in:
which includes the symbolic names of error codes returned by the Data System (DAT). This file need only be included by routines which need to identify the precise nature of an error. The symbolic names have the form:
where `error' is a mnemonic used to identify the error (note the use of two `_' (underline) characters). The actual values of the error codes originate from the VMS MESSAGE utility, and so form a coherent set with the status returns from VMS libraries. A set of error codes which may be used by writers of non-ADAM facility libraries is provided in the include file USER_ERR.
- Parametric Constants
These are symbolic names given to the constants associated with a library. The most commonly needed constants are defined in a file with logical name `SAE_PAR'. In the situation where a program requires the parametric constants for other facilities, these must be included by:
The form of these symbolic constants is identical to that used for error codes, namely:
This chapter provides an overview of the most important ADAM libraries. They are grouped into systems. Each system is described in more detail in a subsequent chapter except the database system, which is mainly used in the SCAR applications package, and the utilities, which are described in Starlink User Notes.
ADAM The Starlink Software Environment