As has been illustrated above, the NDF_ routines refer to NDFs by means of values held in integer variables called NDF identifiers. Of course, these integers are not NDF data structures themselves; they simply identify the data structures, the internal details of which are hidden within the NDF_ system.
Each NDF identifier has a unique value which will not be re-used, and this property makes it possible to tell at any time whether an integer value is a valid NDF identifier or not. An identifier's validity depends on a number of things, such as its actual value (the value NDF__NOID is never valid for instance) and the previous history and current state of the NDF_ system (an identifier which refers to a data structure which has been deleted will no longer be valid). Note that identifier values should not be explicitly altered by applications, as this may also cause them to become invalid.
Identifier validity can be determined by using the routine NDF_VALID, which returns a logical value of .TRUE. via its VALID argument if the identifier supplied is valid:
CALL NDF_VALID( INDF, VALID, STATUS )
This is the only NDF_ routine to which an invalid identifier may be passed without provoking an error.