lun2fn |
Table of contents
ProcedureLUN2FN ( Map logical unit of open file to its name. ) SUBROUTINE LUN2FN ( LUNIT, FILNAM ) AbstractMap the logical unit of an open file to its associated filename. Required_ReadingNone. KeywordsFILES DeclarationsIMPLICIT NONE INTEGER LUNIT CHARACTER*(*) FILNAM Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- LUNIT I A logical unit to be mapped to a filename. FILNAM O Name of the file associated with LUNIT. Detailed_InputLUNIT is the Fortran logical unit that is to be mapped to the filename with which it is associated. The file must be open for this routine to work properly. Detailed_OutputFILNAM is the filename that is associated with the Fortran logical unit LUNIT. ParametersNone. Exceptions1) If the logical unit is not positive, the error SPICE(INVALIDARGUMENT) is signaled. 2) If an error occurs during the execution of the Fortran INQUIRE statement, the error SPICE(INQUIREFAILED) is signaled. 3) If the logical unit is not attached to an open file, the error SPICE(FILENOTOPEN) is signaled. 4) In the event of an error the contents of the variable FILNAM are not defined and should not be used. FilesNone. ParticularsUses the Fortran INQUIRE statement to determine the filename that is associated with the Fortran logical unit LUNIT. ExamplesThe following code fragment illustrates the use of LUN2FN. C C Convert the logical unit to its filename and display it. C CALL LUN2FN ( UNIT1, FNAME1 ) WRITE (*,*) 'The filename is: ', FNAME1 RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionJ. Diaz del Rio (ODC Space) K.R. Gehringer (JPL) VersionSPICELIB Version 1.1.0, 12-AUG-2021 (JDR) Added IMPLICIT NONE statement. Edited the header to comply with NAIF standard. SPICELIB Version 1.0.0, 16-AUG-1994 (KRG) |
Fri Dec 31 18:36:33 2021