EOF?
Syntax EOF?
(EOF? channel)
 
Explanation EOF? checks whether there are more characters available for input in the current input stream. The result is TRUE if there are no more characters to read, FALSE otherwise.

A channel number may be entered as an optional input. If present, EOF? checks that channel instead of checking the input stream. This makes it unnecessary to switch among multiple input streams by changing the value of STANDARD.INPUT.

If you do not test for the EOF (end-of-file) condition while reading, Logo will throw a runtime error when you try to read, and there are no more characters available. You may use CATCH to catch that error, however.

Examples TO TYPE.FILE :FILE
    MAKE "STANDARD.INPUT OPEN :FILE

    
WHILE [NOT EOF?] [PRINT RQ]
 
   CLOSE :STANDARD.INPUT
END
TYPE.FILE defined
TYPE.FILE "TEST.TEXT
This is line 1
This is line 2
This is line 3

TopIndex