The TERMINFO() function returns information from the terminfo database. The TERMINFO.EX() function returns extended data.
The TERMINFO() function enables programs to examine the terminfo database to establish capabilities of the currently selected terminal type.
In the first form, TERMINFO() returns a dynamic array containing a wide range of capability information about the terminal. The structure of this dynamic array is defined in the TERMINFO.H include record in the SYSCOM file. Additional entries may be added in future releases but existing entries will not be moved. The terminfo database capability name to which each item corresponds is shown in the comment text in this include record.
The second form of the TERMINFO() function returns the value of the named capability. The cap.name argument should evaluate to a capability name as used in terminfo source files. This name is case sensitive. Unrecognised capabilities and those for which the terminfo database has no entry will be returned as null strings.
QM extends the terminfo system to allow a string capability to have multiple definitions as alternative codes that might be received from the terminal device. For compatibility with earlier releases, the TERMINFO() function returns only the first string associated with a capability name. The TERMINFO.EX() function returns all strings defined for the capability, separating them by value marks.
As an example, the vt100-at terminfo entry has two alternative strings defined for the kmous capability, corresponding to a single click and a double click of the left mouse button. A program using the KEYCODEV() function to decode incoming data would see both of these as KV$MOUSE.