FORTRAN Reference Manual

Intrinsic Functions
FORTRAN Reference Manual528615-001
8-16
FILENUM Function
Example of the EXP Function
If the value 8 is stored in X, the following statement stores the value 2980.96 in Y:
y = EXP (x)
FILENUM Function
The FILENUM function returns the Guardian open file number of the file associated
with the specified unit number.
k
is an integer expression ranging from 1 through 999 specifying the unit number to
which the file is connected.
Considerations
The value of FILENUM (k) is defined as:
-2 if unit number k is not defined
-1 if unit number k is defined but is not open
0 if unit number k is open
The function value can be used as the file number in calls to Guardian procedures
that require a file number parameter.
FILENUM (k)