NAME

loc - get file location

SYNOPSIS

float loc(fn)
short fn;

DESCRIPTION

Loc returns the current location within the file given by fn.  If fn is zero, the current file is used (see initio(io)).  For random files, the current location is measured in record lengths from the beginning of the file; for other files, the location is measured in IBMSECTORs (see io(inc)).  Although the value returned is always a whole number, this function returns a float to provide for large files. 

This function implements the BASIC LOC function. 

This function resets the current file. 

SEE ALSO

io(inc), initio(io)
loc(func)

DIAGNOSTICS

Error 52 (Bad file number) is generated if fn does not refer to an open user file. 

Error 5 (Illegal function call) is generated if fn refers to a file which is a pipe. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber