KnowledgeBase 00039: Extensions to the Basic INPUT @ Statement

The QMBasic INPUT @ statement has some useful extensions, largely not
found in other multivalue database products. The mode keywords described below
are used as the final element in the syntax of this statement. Where more than
one is used, they may appear in any order.

The general syntax of the INPUT @ statement is

INPUT @(col,row) : var, length {_} {:} {format} {modes}

The default behaviour is to display the existing content of var in a
field of length characters. The user can type in a new value that
replaces the original, clearing the displayed field when the first character
is entered, or they can simply press Return to retain the current
value.

Edit Mode

Use of the EDIT mode keyword starts input in "edit mode", suppressing the
normal automatic clearance of the field when the first character is entered.
This allows the user to enter new data without having to prefix the new data
with some control action such as a cursor move.

Append Mode

Normally, the cursor is positioned at the start of the input field. Use of the
APPEND mode positions the cursor at the end of the current content thus making
it easy to append new characters. Use of APPEND implies edit mode.

Hidden Input

Use of the HIDDEN mode echoes data back to the screen as asterisks in place of
the actual data characters. It is useful for entry of passwords and similar
secure data.

Suppressing Echo

The NO.ECHO mode is even more secretive than HIDDEN and suppresses all echoing
of data back to the screen.

Overlay Mode

The OVERLAY mode causes the input operation to start in a mode where characters
entered at the keyboard overwrite existing data rather than being inserted.
This mode can be toggled during input by use of the Insert key.

Panning

The PANNING mode allows entry of an unlimited number of characters in a field
with display size length. The input data will pan as required when the
data is too large to display in the given field width.

Timeout

The TIMEOUT mode, which takes a qualifying time in seconds, terminates the
input operation if input is not received in the given time. In the event of
a timeout occurring, the content of the input variable is left unchanged.
Use of this mode will usually require the program to use the optional THEN/ELSE
clauses of this statement.