Returns the current position of the specified file.
[ lPos = ] FileTell ( hFile )
The FileTell procedure syntax has the following parts:
Name |
Type |
Description |
lPos |
Long |
Position of the file pointer |
hFile |
Val AFile |
Handle to an open file |
The lPos is expressed as the number of bytes from the beginning of the file. The function returns -1 if the procedure has failed.
The following example calculates current record number according to the nRecordSize and the current file pointer position:
lPos = FileTell(hFile)
If lPos < 0 Then
Print "Error During FileTell..."
Else
lRecordNum = lPos/nRecordSize
Endif