Last modified: Fri Feb 11 14:23:42 2005.
NAME:
Get_Lun
PURPOSE:
Function to obtain a free logical unit number for file access
CALLING SEQUENCE:
Lun = Get_Lun()
INPUT ARGUMENTS:
None.
OUTPUT ARGUMENTS:
None.
FUNCTION RESULT:
Lun: Logical unit number that may be used for file access.
If Lun > 0 it can be used as a logical unit number to open
and access a file.
Lun < 0 a non-existant logical unit number was reached
during the search.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
CALLS:
None.
SIDE EFFECTS:
None known.
RESTRICTIONS:
None.
PROCEDURE:
The search for a free logical unit number begins at 10. The logical
unit number is first tested to see if it exists. If it does not, the
result is set to a negative value. If the file unit does exist, it is
tested to see if it is connected to an open file. If so, it is
incremented by 1. This is repeated until a free (or invalid) logical
unit number is found.
(See File_Utility.f90)
NAME:
File_Exists
PURPOSE:
PUBLIC function to determine if a file unit or a file exists.
CALLING SEQUENCE:
Result = File_Exists( FileID/Filename )
INPUT ARGUMENTS:
Specify one of:
FileID: The logical unit number for which the existence
is to be determined.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN )
or
Filename: Name of the file the existence of which is to
be determined.
UNITS: N/A
TYPE: CHARACTER( * )
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN )
OUTPUT ARGUMENTS:
None.
FUNCTION RESULT:
Result: The return value is a logical result.
If .TRUE. the file unit/file exists.
.FALSE. the file unit/file does not exist.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
CALLS:
None.
SIDE EFFECTS:
None known.
RESTRICTIONS:
None.
(See File_Utility.f90)
NAME:
File_Open
PURPOSE:
Function to determine if a file is open for I/O.
CALLING SEQUENCE:
Result = File_Open( FileID/Filename )
INPUT ARGUMENTS:
Specify one of:
FileID: The logical unit number of the file.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN )
or
Filename: The name of the file.
UNITS: N/A
TYPE: CHARACTER( * )
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN )
OUTPUT ARGUMENTS:
None.
FUNCTION RESULT:
Result: The return value is a logical result.
If .TRUE. the file is open.
.FALSE. the file is not open
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
CALLS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
It is assumed the file unit or name exists.
(See File_Utility.f90)