contents.gifprev1.gifnext1.gif

GET_INFO (STRING_VARIABLE)

Description:

This built-in requires two parameters, the first being a string variable (key map or key map list name). The second parameter is any of the requests below.

Parameter 2 Return

"journal" Returns any of the following array indices according to the string parameter specifications.

1. Journaled buffer name.

2. Journal file creation date and time.

3. Edit session creation date and time.

4. Source filename.

5. Output filename.

6. Original filename.

7. ID string.

"pre_key_procedure" Returns the program called before a routine bound to a key is executed or 0 if no procedure is defined. Note that the called procedure must be stored to either a key-map or key-map-list.

"post_key_procedure" Returns the program called after a routine bound to a key is executed or 0 if no procedure is defined. Note that the called procedure must be stored to either a key-map or key-map-list.

"self_insert" Returns integer 1 if printable but undefined characters will be inserted at the cursor when typed or 0 if such characters won't be inserted.

"shift_key" Returns the name of the key currently defined as the shift key.

“undefined_key" Returns the program called if an undefined key is typed, or 0 if nu/TPU returns the default message when an undefined key is typed.

Syntax:

value := GET_INFO ( string_variable, request )

Example:

The following code stores the name var1$keymaplist to the variable var1$key. Next it sets the PRE and POST KEY PROCEDURES in var1$keymaplist to FRED and DERF. Finally, it copies the gentleman's name to the current edit position.

var1$key := CREATE_KEY_MAP_LIST ("var1$keymaplist",

CREATE_KEY_MAP("var1$keymap"));

SET(PRE_KEY_PROCEDURE, var1$key, "COPY_TEXT('FRED')");

SET(POST_KEY_PROCEDURE, var1$key, "COPY_TEXT('DERF')");

EXECUTE (GET_INFO (var1$key, "PRE_KEY_PROCEDURE"));

COPY_TEXT ('-“);

EXECUTE (GET_INFO (var1$key, "POST_KEY_PROCEDURE"));