numRecords = lof(deviceID [,recordLength])
deviceID is the ID number of an open file,
lof returns the total number of records in the file. If
_printerPort (and the specified device is open),
lof returns the total number of records currently in the device's input buffer. If there is a "partial" record at the end of the file (or input buffer), it is included in the count.
The returned record count is based on the record length given in
recordLength, if it's specified. If this parameter is omitted,
lof uses the record length that was specified in the
open statement when the file or the port was opened. If
recordLength is omitted and no record length was specified in the
open statement, a default record length of 256 is used.
To determine the total number of bytes in the file or in the serial input buffer, use
record; rec; loc; open