loc()

Returns read/write cursor position in file.

Syntax:
loc( stream )

stream is a file previously opened by the open command.

Example:
open "myfile.txt" for input as 1
while eof(1)=0
position = loc( 1 )
fprints("loc:"+str$(position)+" - ")
file input #1,a$
prints(a$)
end while
close 1
waitKey

See also seek() command.