11 - 61 11 - 61
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
EOF
Function
End Of File
• Returns -1 (True) if the end of a sequential file is detected.
EOF ( <file number> )
Syntax
file number
• • • •
Specify the file number specified by the OPEN
instruction.
Examples
IF EOF (1) THEN CLOSE #1
• • • •
Closes the file when the end of a sequential file,
which has file number 1, is detected.
Description
• The EOF function detects the end of a file specified by <file number> in the sequential file.
• Returns True (-1) at the end of the file, otherwise returns False (0).
REMARK
See the LOC, LOF and OPEN instructions, and Chapter 6.