Specifications
371
Syntax:
LOF([#]filenumber)
Parameter:
filenumber
A numeric expression which returns a value from 1 to 16.
Description:
LOF returns the length of a data file or communications device file specified by
filenumber.
• Depending upon the file type, the content of the returned value differs as listed
below.
• If you specify the bar code device file, a run-time error will occur.
Run-time errors:
Reference:
Location Of File File I/O function
LOF
Returns the length of a specified file.
File type Returned value
Data file Number of written records
Communications device file Number of bytes of unoccupied area in the
receive buffer
Error code Meaning
34h
Bad file name or number
(You specified
filenumber of an unopened file.)
36h
Improper file type
(You specified
filenumber of a bar code device file.)
3Ah
File number out of the range
Statements:
GET, INPUT, LINE INPUT, OPEN, and OPEN "COM:"
Functions:
EOF, INPUT$, and LOC