Terminal and keyboard independence refers to the ability of an application to communicate with a user's output device (terminal) and input device (keyboard) without regard to the manufacturer of the device. The control sequences required to manipulate various aspects of the output device (e.g. move cursor, add bold , underscore etc.) varies among manufacturers. Similarly, the sequence of characters generated by a keyboard when certain non-alpha keys are depressed (for example. the function keys, cursor up key etc.) also varies. For MultiValue applications, help exists from the language to provide independence of this variance among devices.
In the domain of this discussion, terminal
refers to console windows such as Terminal sessions, and the Microsoft Windows command terminal, and to legacy green screen
terminals such as the VT-100 or the Wyse 60.
Caché contains a set of terminal definitions suitable for MultiValue applications. For practical purposes, this is limited to the most popular definitions, but it is easy to add or modify existing definitions. These MultiValue definitions differ from the terminal definitions of standard Caché devices because the latter do not cover all the requirements of a MultiValue application. The MultiValue definitions pointed to by the TERMDEFS definition in the VOC. The layout of an entry in the TERMDEFS file is a simple text record which mirrors the terminal definition given by the "infocmp" command on most UNIX® systems.
When a user begins a MultiValue session, Caché defaults to use a terminal of type CACHE of fixed screen size. This can be modified by executing the TERM
command, as detailed later.
The application can write control characteristics to the terminal in an independent way using the MultiValue Basic @ function
There is no real MultiValue standard for reading control characteristics from the keyboard. Pressing the F1 key on a keyboard, for example, will simply return a stream of regular characters in the range $c(32) through $c(255). Examples of input processing are also available in the SAMPLES database.
These facilities allow replacement of the jBASE CommandInit and CommandNext subroutines.