IN |
![]() ![]() ![]() |
The IN statement reads a single byte from the terminal with an optional timeout.
Format
IN var {FOR timeout {THEN statement(s)} {ELSE statement(s)}}
where
The IN statement reads a single byte from the terminal, returning the character value in var. Unless the character is a non-printing control code, it is echoed to the terminal.
If a timeout is specified, the program will continue execution if no input is received after this period. The var will be set to zero if a timeout occurs.
The optional THEN and ELSE clauses can be used with the timeout to determine whether input was received.
See also: |