LINES

 ──LINES(─┬──────┬──)─────
            └─name─┘

LINES returns 1 if any data remains between the current read position and the end of the character input stream name, and returns 0 if no data remains. In effect, LINES reports whether a read action performed by CHARIN or LINEIN will succeed.

The form of the name is implementation dependent. If you omit name, then the presence or absence of data in the default input stream (STDIN:) is returned. For OS/2 devices, LINES always returns 1.

Here are some examples:

LINES(myfile)    ->    0    /* at end of the file   */

LINES()          ->    1    /* data remains in the  */
                            /* default input stream */
                            /* STDIN:         */

LINES("COM1:")   ->    1     /* An OS/2 device name  */
                            /* always returns '1'   */

┴╓: The CHARS function returns the number of characters in a persistent stream or the presence of data in a transient stream.