Skip to content
Brain edited this page May 5, 2023 · 4 revisions

INPUT

INPUT variable

Pause the program waiting for user input, which will be echoed to the terminal. The input will then be placed in a variable. String, integer and real variables are accepted. Invalid input (e.g. text when expecting a number) will cause the input value to be zero.

The INPUT statement is somewhat primitive. If you wish to handle text input (not numeric) and want full editing facilities with cursor keys and history, you should consider using the ansi library instead which gives these features plus full control over the IO loop so you can do other things whilst waiting for a line to be entered.

Clone this wiki locally