
Chapter 15. Function Reference
333
____________________________________________________________________
Location Of File File I/O function
LOF
Returns the length of a specified file.
____________________________________________________________________
Syntax:
Syntax:Syntax:
Syntax:
LOF([#]filenumber)
Parameter:
Parameter:Parameter:
Parameter:
filenumber
A numeric expression which returns a value from 1 to 16.
Description:
Description:Description:
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.
File type Returned value
Data file Number of written records
Communications device file Number of bytes of unoccupied area in the
receive buffer
• If you specify the bar code device file, a run-time error will occur.
Run
RunRun
Run-
--
-time errors:
time errors:time errors:
time errors:
Error code Error code
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
Reference:
Reference:Reference:
Reference:
Statements: GET, INPUT, LINE INPUT, OPEN, and OPEN "COM:"
Functions: EOF, INPUT$, and LOC
Kommentare zu diesen Handbüchern