Fortran Library Reference

ftello64: Return Current Position of File

The function is called by:

INTEGER*8 ftello64

n = ftello64( lunit )

lunit

INTEGER*4

Input  

Open logical unit  

Return value 

INTEGER*8

Output 

n>=0: n=Offset in bytes from start of file

n<0: n=System error code

Example: ftello64():


    INTEGER*8 ftello64, lunit/1/, n
    open( UNIT=lunit, FILE='MyFile' )
    ... 
    n = ftello64( lunit )
    if ( n .lt. 0 ) stop 'ftell error'
    ...