fn2lun |
Table of contents
ProcedureFN2LUN ( Map name of open file to its logical unit. ) SUBROUTINE FN2LUN ( FILNAM, LUNIT ) AbstractMap the name of an open file to its associated logical unit. Required_ReadingNone. KeywordsFILES DeclarationsIMPLICIT NONE CHARACTER*(*) FILNAM INTEGER LUNIT Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- FILNAM I Name of the file to be mapped to its logical unit. LUNIT O The logical unit associated with the filename. Detailed_InputFILNAM is the filename that is to be mapped to its associated Fortran logical unit. Detailed_OutputLUNIT is the Fortran logical unit that is associated with the filename FILNAM. The file must be open for this routine to work properly. ParametersNone. Exceptions1) If the filename is blank, the error SPICE(BLANKFILENAME) is signaled. 2) If an error occurs during the execution of the Fortran INQUIRE statement, the error SPICE(INQUIREFAILED) is signaled. 3) If the filename is not associated with an open file, the error SPICE(FILENOTOPEN) is signaled. 4) If the filename is not associated with an existing file, the error SPICE(FILEDOESNOTEXIST) is signaled. 5) In the event of an error the contents of the variable LUNIT are not defined, and should not be used. FilesNone. ParticularsUse 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 FN2LUN. C C Convert the logical unit to its filename and display it. C CALL FN2LUN ( FNAME, LUNIT ) WRITE (*,*) 'The logical unit is: ', LUNIT 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:22 2021