Gets the position of the file pointer in a file.
fh (scalar) – file handle of a file opened with fopen().
pos (scalar) – current position of the file pointer in a file.
The ftell() function returns the position of the file pointer in terms of bytes from
the beginning of the file. The call may fail if the file buffer needs to
be flushed (see fflush()).
If an error occurs, ftell() returns -1. You can call fstrerror() to find out
what the error was.
If you pass ftell() the handle of a file opened with open (i.e., a data
set or matrix file), your program will terminate with a fatal error.
Functions fopen(), fseek()