base.Channel.isEof

Detect the end of a file.

Syntax

isEof()
  RETURNING result BOOLEAN

Usage

Use the isEof() method to detect the end of a file while reading from a channel.

The end of file is only detected after the last read. In other words, you first read, then check for the end of file and process if not end of file.

DEFINE s STRING
WHILE TRUE
  LET s = ch.readLine()
  IF ch.isEof() THEN 
     EXIT WHILE
  END IF
  DISPLAY s 
END WHILE