GETBYTE
Syntax GETBYTE
(GETBYTE channel)
 
Explanation

GETBYTE reports the ASCII value of the first character in the input stream. If no character is waiting to be read, GETBYTE waits for input from the Listener.

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

See and PUTBYTE.

Examples The following procedure prints all input typed until the Enter key is pressed.

TO WAIT.FOR.ENTER.KEY
TEST GETBYTE = 13 
IFFALSE [WAIT.FOR.ENTER.KEY]
WAIT.FOR.ENTER.KEY defined 

TopIndex