
The INPUT command reads data from either the currenrt I/O interface or a file into variables, depending on the mode (see INMODE). INPUT can handle strings and 32 bit signed integer variables. If input succeeds, the pseudo variable LASTERR is set to 0 (ERR_OK) and BYTESREAD contains the number of bytes actually read.
The following example repeats all input until the user enters "stop":
outmode -2
inmode -2
do
input c$
if c$ = "stop" then
end
end if
print "you entered ";
print c$
loop
If there's no active input channel, that is, INMODE was called with -1, LASTERR and BYTESREAD are both zero.