Placeholders also provide a convenient means of obtaining ``scratch'' NDFs for temporary use within an application. In this case, exactly the same NDF creation routine can be used, but the placeholder is obtained using the routine NDF_TEMP, which returns a placeholder for a temporary NDF. To create a temporary simple NDF, the following calls might be used:
CALL NDF_TEMP( PLACE, STATUS )
CALL NDF_NEW( '_INTEGER', NDIM, LBND, UBND, PLACE, INDF, STATUS )
The resulting NDF identifier INDF may be used in exactly the same way as an identifier for a permanent NDF, except that the data structure it is associated with will not be retained after it has been finished with. More specifically, a temporary NDF will be deleted as soon as the last NDF identifier associated with it is annulled, either explicitly (i.e. with NDF_ANNUL) or implicitly (e.g. as part of the cleaning up performed by NDF_END).
It is possible to determine whether an existing NDF identifier refers to a temporary NDF using the routine NDF_ISTMP:
CALL NDF_ISTMP( INDF, ISTMP, STATUS )
A logical value of .TRUE. is returned via the ISTMP argument if the NDF is temporary.