4 Data Variables and Data handling

Eloquence keyboard handling

Two statement groups allow better control of the Eloquence keyboard processing.

NOTE: These keywords are not available when working with graphical user interface.

Typeahead

Eloquence normally rejects any key pressed while it is busy with a beep signal. The TYPEAHEAD statement enables the program to control Eloquence keyboard handling

TYPEAHEAD n

The typeahead statement adjusts the keyboard mode. Changing the keyboard mode implies a TYPEHEAD CLEAR operation.

n = 0
Default behavior. Any key pressed while Eloquence is not in input state will be rejected.
n = 1
Partial typeahead. Any key, which is not a function key is saved in a typeahead buffer for later processing.
Function keys are executed immediately.
n = 2
Full typeahead. All keys are saved in the typeahead buffer for later processing.
In TYPEAHEAD mode 1, the program must be aware, that there may be some saved keystrokes, if reacting upon a function key.

In TYPEAHEAD mode 2, it's not possible to interrupt a program (for example abort a very long printout) using a function key. Function keys loose their meaning, while not in INPUT mode.

TYPEAHEAD CLEAR

Clear the typeahead buffer. If a character is currently in typeahead buffer, a
beep is output to indicate the loss of input.

N=TYPEAHEAD

The typeahead function returns the number of characters currently in typeahead buffer.


Eloquence Language Manual - 19 DEC 2002