BASIC INPUT Statement - fvdhoef/aquarius-plus GitHub Wiki
INPUT
TYPE: BASIC I/O Statement
FORMAT: INPUT variable
Action: Displays prompt and accepts input from keyboard.
- variable is a simple variable or array element.
- Prints a question mark and space, after which the cursor is displayed.
- The initial value of the variable is not displayed.
- The user then types the data to be assigned to the variable, then the Enter key.
- The Backspace key will delete the character to the left of the cursor.
- If there are no characters to delete, a beep is generated.
- If Enter is pressed with no characters entered,
INPUTends leaving the variable unchanged. - If a numeric variable is specified and the entered data is not a valid numeric literal:
- The message
? Redo from startis displayed on a new line. - The question mark is printed at the beginning of the next line and entry starts over.
- The message
Examples:
FORMAT: INPUT variable_list
Action: As above with multiple entries.
- variable_list is a series of variables separated by commas.
- ToDo finish this
Examples:
FORMAT: INPUT "prompt" ; variables
Action: As above but displays the specified text before prompting for input.
- variables is either a single variable or a comma separated list of variables
- prompt is the text to be displayed before the question mark.
- The text must be surrounded by quotation marks.
- String expressions are not allowed.
- ToDo finish this
Examples:
FORMAT: INPUT ( row , column ) , minlen , maxlen , token variable
Action: Accepts data input at the specified screen position.
- row and column specify the position at which data entry begins.
- The initial value of the variable, is displayed at the specified location, immediately followed by the cursor.
- minlen specifies a minimum length for the entered data.
- If the entered data is less than minlen characters long, a beep is generated and data entry continues.
- Trailing spaces are removed from the entry before checking the length.
- maxlen specifies the maximum length of the entered data.
- When the entry length is equal to maxlen, any subsequent keystrokes will generate a beep and will not added to the entry.
- A maximum of maxlen + 1 characters will be displayed on screen during entry.
- token specifies the type of entry:
INTspecifies an integer value.- This option is currently under development
- `STR` specifies a string value.
- _variable_ must be a string simple variable or array element.
- If the initial length of string is greater than _maxlen_, _String too long error_ results.
- **ToDo:** finish this
- Action keys: **think of a better phrase**
- **ToDo:** finish thi