STDIN LINE statement

Purpose

Read one line of text from the standard input device.

Syntax

STDIN LINE a$

Remarks

If data is available, it is placed in the a$ variable; otherwise, an empty string is returned.  You can keep reading data from STDIN, until the STDEOF function returns TRUE (non-zero).  If input redirection is not present, STDIN LINE reads data from the keyboard until a CTRL+Z keystroke is detected.

Restrictions

STDIN LINE does not work with pipes.

See also

CONSIN, CONSOUT, GETSTDERR, GETSTDIN, GETSTDOUT, PRINT, STDEOF, STDERR, STDOUT

Example

WHILE NOT STDEOF     ' loop until end-of-file or CTRL+Z is reached

  STDIN LINE a$   ' read a line of data

  a$ = UCASE$(a$) ' convert it to upper case

  STDOUT a$       ' write it to STDOUT

WEND