FNUM - The GNU Fortran Compiler
Description: The GNU Fortran Compiler

Next: FPUT, Previous: FLUSH, Up: Intrinsic Procedures

### 8.88 `FNUM` — File number function

Description:
  `FNUM(UNIT)` returns the POSIX file descriptor number corresponding to the open Fortran I/O unit `UNIT`.
Standard:
  GNU extension
Class:
  Function
Syntax:
  `RESULT = FNUM(UNIT)`
Arguments:

  UNIT | The type shall be `INTEGER`.

Return value:
  The return value is of type `INTEGER`
Example:

                program test_fnum
                  integer :: i
                  open (unit=10, status = "scratch")
                  i = fnum(10)
                  print *, i
                  close (10)
                end program test_fnum