Powered by QM on a Linux server
Help and Support

KnowledgeBase 00039: Extensions to the Basic INPUT @ Statement

Last updated: 27 Dec 2018
Applies to: All versions
Top level index       Full Index Search Tips
Previous article     Next article

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.


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.


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.

Forcing Upper Case

The UPCASE mode converts input data to upper case as it is typed.

Related Articles


Please tell us if this article was helpful
Very     Slightly     Not at all
Email (optional)