NAME

lof - get file length

SYNOPSIS

float lof(fn)
short fn;

DESCRIPTION

Lof returns the length of the file given by fn.  If fn is zero, the current file is used (see initio(io)).  If the file is a tty, lof returns zero.  If the file is a pipe, this function returns the number of characters currently buffered in the pipe.  The length of a file is measured in bytes.  For a file open for output only, the length of the file is also the current location.  Although the value returned is always a whole number, this function returns a float to provide for large files. 

This function implements the BASIC LOF function. 

This function resets the current file. 

SEE ALSO

initio(io)
lof(func)

DIAGNOSTICS

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

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber