The number of NDF identifiers available at any time is quite large but is, nevertheless, limited. Each identifier also consumes various computer resources which may themselves be limited, so it is important to ensure that identifiers are annulled once they have been finished with, i.e. when access to the associated NDF data structure is no longer required. This is particularly important when an application is to be run from a programming environment where the same executable program continues to run indefinitely (e.g. when using the ADAM command language ICL). Failure to annul every NDF identifier before the application finishes can result in the program eventually being unable to continue, an event which may be accompanied by strange error messages.
Annulling an NDF identifier renders it invalid and resets its value to NDF__NOID. It differs from simply setting the identifier's variable to this value, however, because it ensures that all resources associated with it are released and made available for re-use. An identifier is annulled using the routine NDF_ANNUL, as follows:
CALL NDF_ANNUL( INDF, STATUS )
Note that annulling an invalid identifier will produce an error, but this will
be ignored if the STATUS argument is not set to SAI__OK when NDF_ANNUL is
called (i.e. indicating that a previous error has occurred).
This means that it is not usually necessary to check whether an identifier
is valid before annulling it, so long as the only possible reason for it being
invalid is a previous error which has set a STATUS value.