loc - current position in file
FileNum is the file number used when the file was opened.
When used with a random file,
returns the record number of the last record
read or written to the file.
When used with a sequential file,
returns the number of (128 byte) records read from or
written to the file since it was opened.
In the first example, the variable recs is set to the number
of records read off of file number 1 (assumed to be opened for
recs = loc(1)
In the second example, the program stops after seventy records
have been read off of file number 1:
if loc(1) > 70 then stop
A "Bad file number" error occurs if FileNum does not refer to an open file.
An "Illegal function call" error occurs if FileNum refers to a file which
is a pipe (see open).
The Basmark QuickBASIC Programmerís Manual