FTELL(3f)

DESCRIPTION
Retrieves the current position within an open file.

This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit.

STANDARD
GNU extension

CLASS
Subroutine, function

SYNTAX

CALL FTELL(UNIT, OFFSET) OFFSET = FTELL(UNIT)

ARGUMENTS

OFFSET Shall of type INTEGER. UNIT Shall of type INTEGER.

RETURN VALUE
In either syntax, OFFSET is set to the current offset of unit number UNIT, or to -1 if the unit is not currently open.

EXAMPLE
          PROGRAM test_ftell
            INTEGER :: i
            OPEN(10, FILE="temp.dat")
            CALL ftell(10,i)
            WRITE(*,*) i
          END PROGRAM

SEE ALSO
FSEEK

AUTHOR

This information was taken from the GFortran documentation (https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gfortran/) and converted to a manpage by AstroFloyd (http://astrofloyd.org).