READ
Syntax READ
(READ channel)
 
Explanation READ reports the first object from the input stream. If no object is waiting to be read, READ waits for input from the keyboard. If the input contains more than one word, the remainder is evaulated by Logo as commands. READ throws an I/O error if the end of the file is reached.

A channel number may be entered as an optional input. If present, READ reads from that channel instead of reading from the input stream. This makes it easier to switch among multiple input streams.

Unlike READWORD, READ does not accept the empty list as input. It continues to wait until a response is made that is not empty.

See also READCHAR, READLINE, READLIST, and READQUOTE.

Examples TO GREETING
     PR [WHAT'S YOUR NAME?] 

     MAKE "RESPONSE READ 
     IF NOT EMPTY? :RESPONSE [PR SENTENCE [HI THERE,] WORD :RESPONSE "!]
END
GREETING defined
GREETING
WHAT'S YOUR NAME? 
(just <Enter> is pressed) 
ELEANOR
HI THERE, ELEANOR! 
GREETING 
WHAT'S YOUR NAME? 
ELEANOR RIGBY
HI THERE, ELEANOR! 
RIGBY is neither a procedure nor a name

TopIndex