NAME

loc - current position in file

SYNOPSIS

v = loc(FileNum)

DESCRIPTION

FileNum is the file number used when the file was opened.  When used with a random file, loc returns the record number of the last record read or written to the file.  When used with a sequential file, loc returns the number of (128 byte) records read from or written to the file since it was opened. 

EXAMPLE

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 sequential read):
	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

SEE ALSO

open

DIAGNOSTICS

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). 

from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber