Updated: 11 December 1998 |
DEC Text Processing Utility Reference Manual
Previous | Contents | Index |
:= GET_INFO (any_keyname,
- integer
- keyword
)
- "key_modifiers"
- "key_type"
- "unmodified"
"key_modifiers"
Returns a bit-encoded integer that indicates what key modifier or modifiers were used to create the DECTPU key name specified by the parameter any_keyname. For more information about the meaning and possible values of key modifiers, see the description of the KEY_NAME built-in procedure.DECTPU defines four constants to be used when referring to or testing the numerical value of key modifiers. The correspondence between key modifiers, defined constants, and bit-encoded integers is as follows:
Key Modifier Constant Bit-Encoded Integer SHIFT_MODIFIED TPU$K_SHIFT_MODIFIED 1 CTRL_MODIFIED TPU$K_CTRL_MODIFIED 2 HELP_MODIFIED TPU$K_HELP_MODIFIED 4 ALT_MODIFIED TPU$K_ALT_MODIFIED 8 You may have used the SHIFT_KEY keyword to create a DECTPU key name. SHIFT_KEY is not a modifier; it is a prefix. The Shift key is also called the GOLD key by the EVE editor. To use the Shift key, press and release it before you press any other key.
In DECwindows, to use modifying keys (such as Ctrl), press and hold the modifying key while you press the modified key.
If you use more than one key modifier with the KEY_NAME built-in procedure, the value of the returned integer is the sum of the integer representations of the key modifiers. For example, if you create a key name by using the modifiers HELP_MODIFIED and ALT_MODIFIED, the GET_INFO (any_keyname, "key_modifiers") built-in returns the integer 12.
"key_type"
Returns a keyword that describes the type of key named by any_keyname. The keywords that can be returned are PRINTING, KEYPAD, FUNCTION, CONTROL, SHIFT_PRINTING, SHIFT_KEYPAD, SHIFT_FUNCTION, and SHIFT_CONTROL. Returns 0 if parameter1 is not a valid key name. There are cases in which GET_INFO (any_keyname, "name") returns the PRINTING keyword but the key described by the key name is not associated with a printable character. For example, if you use the KEY_NAME built-in to define a key name as the combination of the character A and the ALT modifier, and if you then use GET_INFO (any_keyname, "name") to find out how DECTPU classifies the key, the GET_INFO built-in returns the PRINTING keyword. However, if you use the ASCII built-in to obtain the string representation of the key, the ASCII built-in returns a null string because ALT/A is not printable."unmodified"
Returns a keyword that describes the key name specified by any_keyname without any modifiers. For example, if you create a key name for the F20 key with the ALT_MODIFIED modifier, the GET_INFO (any_keyname, "unmodified") built-in returns the F20 keyword.
integer
Returns requested information about the integer you specify.keyword
Returns requested information about the keyword you specify.
The GET_INFO (any_keyname) procedure returns a keyword that describes the type of key named by any_keyname.For general information about using all forms of GET_INFO built-in procedures, see the description of GET_INFO.
In the following example, the first statement creates a DECTPU key name for the key sequence produced by pressing the Ctrl key, the Shift key, and the 4 key on the keypad all at once. The new key name is assigned to the variable new_key. The second statement fetches the integer equivalent of this combination of key modifiers. The third statement displays the integer 3 in the message buffer. The IF clause of the fourth statement shows how to test whether a key name was created using a modifier. (This statement does not detect whether a key name was created using the SHIFT_KEY keyword.) The THEN clause shows how to fetch the key modifier keyword or keywords used to create a key name. The final statement displays the string KEY_NAME (KP4, SHIFT_MODIFIED, CTRL_MODIFIED) in the message buffer.
new_key := KEY_NAME (KP4, SHIFT_MODIFIED, CTRL_MODIFIED); modifier_value := GET_INFO (new_key, "key_modifiers"); MESSAGE (STR (modifier_value)); IF GET_INFO (new_key, "key_modifiers") THEN the_name := GET_INFO (new_key, "name") MESSAGE (STR (the_name)); ENDIF; |
string := GET_INFO (any_keyword, "name")
"name"
Returns the string equivalent of the specified keyword.You can use GET_INFO (any_keyword, "name") to obtain the string equivalent of a key name. This is useful for displaying screen messages about keys. For example, to obtain the string equivalent of the key name PF1, you could use the following statement:
the_string := GET_INFO (PF1, "name");If a key name is created using several key modifiers, the built-in returns the string representations of all the keywords used to create the key name. For more information on creating key names, see the description of the KEY_NAME built-in procedure.
The GET_INFO (any_keyword) procedure returns the string representation of the keyword specified in the first parameter to GET_INFO.For general information about using all forms of GET_INFO built-in procedures, see the description of GET_INFO. See also the description of GET_INFO (integer_variable).
The following example shows one possible use of GET_INFO (any_keyword, "name"). The first statement creates a DECTPU key name for the key sequence produced by pressing the Ctrl key, the Shift key, and the 4 key on the keypad all at once. The new key name is assigned to the variable key_name. The IF clause of the statement shows how to test whether a key name was created using one or more key modifier keywords. (This statement does not detect whether a key name was created using the SHIFT_KEY keyword. The GET_INFO (any_keyname, "key_modifiers") built-in returns 0 even if the key name was created using SHIFT_KEY.) The THEN clause shows how to fetch the key modifier keyword or keywords used to create a key name. The final statement displays the string KEY_NAME (KP4, SHIFT_MODIFIED, ALT_MODIFIED) in the message buffer.
new_key := KEY_NAME (KP4, SHIFT_MODIFIED, CTRL_MODIFIED); ! . ! . ! . IF GET_INFO (new_key, "key_modifiers") <> 0 THEN the_name := GET_INFO (new_key, "name") ENDIF; MESSAGE (STR (the_name)); |
keyword := GET_INFO (any_variable, "type")
"type"
Returns a keyword that is the data type of the variable specified in any_variable.
The GET_INFO (any_variable) procedure returns a keyword that specifies the data type of the variable.For general information about using all forms of GET_INFO built-in procedures, see the description of GET_INFO.
The following example tests whether the variable select_popup has been assigned a value of type widget. If not, the code causes a message to be displayed on the screen.
IF GET_INFO (select_popup, "type") <> WIDGET THEN MESSAGE ("Select_popup widget not created.") ENDIF; |
array := GET_INFO (ARRAY,
)
- "current"
- "first"
- "last"
- "next"
- "previous"
"current"
Returns the current array in DECTPU's internal list of arrays. You must use either GET_INFO (ARRAY, "first") or GET_INFO (ARRAY, "last") before you can use GET_INFO (ARRAY, "current"). If you use these built-ins in the wrong order or if no arrays have been created, GET_INFO (ARRAY, "current") returns 0."first"
Returns the first array in the DECTPU internal list of arrays; returns 0 if no arrays are defined."last"
Returns the last array in the DECTPU internal list of arrays; returns 0 if no arrays are defined."next"
Returns the next array in DECTPU's internal list of arrays. This parameter is valid whenever GET_INFO (ARRAY, "current") would return an array. That is, the intended usage of this parameter is that you use GET_INFO (ARRAY, "first") before you can use GET_INFO (ARRAY, "next").Returns 0 if you use this parameter immediately after GET_INFO (ARRAY, "last"), or if you have not created an array.
"previous"
Returns the previous array in DECTPU's internal list of arrays. The intended usage of this parameter is that you use either GET_INFO (ARRAY, "current") or GET_INFO (ARRAY, "last") before you use GET_INFO (ARRAY, "previous").Returns 0 if you use this parameter immediately after GET_INFO (ARRAY, "first"), or if you have not created an array.
The GET_INFO (ARRAY) procedure returns an array in DECTPU's internal list of arrays.For general information about using all forms of GET_INFO built-in procedures, see the description of GET_INFO.
:= GET_INFO (array_variable,
- array
- buffer
- integer
- keyword
- marker
- process
- range
- string
- widget
- window
)
- "current"
- "first"
- "high_index"
- "last"
- "low_index"
- "next"
- "previous"
"current"
Returns the index value of the current element of the specified array, whether the index is of type integer or some other type. Returns any type except program, pattern, or learn. Returns the UNSPECIFIED keyword if there is no current element.You must use either GET_INFO (array_variable, "first") or GET_INFO (array_variable, "last") before you can use GET_INFO (array_variable, "current").
"first"
Returns the index value of the first element of the specified array, whether the index is of type integer or some other type. Returns any type except program, pattern, or learn. Returns the UNSPECIFIED keyword if there is no first element."high_index"
Returns an integer that is the highest valid integer index for the static predeclared portion of the array. If the GET_INFO call returns a high index lower than the low index, the array has no static portion."last"
Returns the index value of the last element of the specified array, whether the index is of type integer or some other type. Returns any type except program, pattern, or learn. Returns the UNSPECIFIED keyword if there is no last element."low_index"
Returns an integer that is the lowest valid integer index for the static predeclared portion of the array. If the GET_INFO call returns a high index lower than the low index, the array has no static portion."next"
Returns the index value of the next element of the specified array, whether the index is of type integer or some other type. Returns any type except program, pattern, or learn. Returns the UNSPECIFIED keyword if there is no next element.You must use GET_INFO (array_variable, "first") before you can use GET_INFO (array_variable, "next").
"previous"
Returns the index value of the previous element of the specified array, whether the index is of type integer or some other type. Returns any type except program, pattern, or learn. Returns the UNSPECIFIED keyword if there is no previous element.You must use either GET_INFO (array_variable, "current") or GET_INFO (array_variable, "last") before you can use GET_INFO (array_variable, "previous").
array
Returns requested information about the array you specify.buffer
Returns requested information about the buffer you specify.integer
Returns requested information about the integer you specify.keyword
Returns requested information about the keyword you specify.marker
Returns requested information about the marker you specify.process
Returns requested information about the process you specify.range
Returns requested information about the range you specify.string
Returns requested information about the string you specify.widget
Returns requested information about the widget you specify.window
Returns requested information about the window you specify.
The GET_INFO (array_variable) procedure returns information about a specified array.For general information about using all forms of GET_INFO built-in procedures, see the description of GET_INFO.
buffer := GET_INFO (BUFFER[[S]]
)
- "current"
- "find_buffer", buffer_name
- "first"
- "last"
- "next"
- "previous"
"current"
Returns the current buffer in DECTPU's internal list of buffers; returns 0 if there is no current buffer.GET_INFO (BUFFER[[S]], "current") always returns the current buffer, regardless of whether you have first used GET_INFO (BUFFER[[S]], "first") or GET_INFO (BUFFER[[S]], "last"). Thus, GET_INFO (BUFFER[[S]], "current") is equivalent to the CURRENT_BUFFER built-in procedure.
"find_buffer", buffer_name
Returns the buffer whose name you specify (as a string) as the third parameter; returns 0 if no buffer with the name you specify is found."first"
Returns the first buffer in DECTPU's internal list of buffers; returns 0 if there is none."last"
Returns the last buffer in DECTPU's internal list of buffers; returns 0 if there is none."next"
The next buffer in DECTPU's internal list of buffers; returns 0 if there are no more."previous"
Returns the preceding buffer in DECTPU's internal list of buffers; returns 0 if there is none.
The GET_INFO (BUFFER) procedure returns a buffer in DECTPU's internal list of buffers.For general information about using all forms of GET_INFO built-in procedures, see the description of GET_INFO.
:= GET_INFO (buffer_variable,
- integer
- keyword
- learn_sequence
- marker
- program
- range
- string
- "before_bol"
- "beyond_eob"
- "beyond_eol"
- "bound"
- "character"
- "direction"
- "eob_text"
- "erase_unmodifiable"
- "file_name"
- "first_marker"
- "first_range"
- "journaling"
- "journal_file"
- "journal_name"
- "key_map_list"
- "left_margin"
- "left_margin_action"
- "line"
- "map_count"
- "max_lines"
- "middle_of_tab"
- "mode"
- "modifiable"
- "modified"
- "move_vertical_context"
- "name"
- "next_marker"
- "next_range"
- "no_write"
- "offset"
- "offset_column"
- "output_file"
)
- "permanent"
- "read_routine", GLOBAL_SELECT
- "record_count"
- "record_number"
- "record_size"
- "right_margin"
- "right_margin_action"
- "safe_for_journaling"
- "system"
- "tab_stops"
- "unmodifiable_records"
"before_bol"
Returns an integer (1 or 0) that indicates whether the editing point is located before the beginning of a line."beyond_eob"
Returns an integer (1 or 0) that indicates whether the editing point is located beyond the end of a buffer."beyond_eol"
Returns an integer (1 or 0) that indicates whether the editing point is located beyond the end of a line."bound"
Returns an integer (1 or 0) that indicates whether the marker that is the specified buffer's editing point is bound to text. For more information about bound markers, see the Guide to the DEC Text Processing Utility."character"
Returns a string that is the character at the editing point for the buffer."direction"
Returns the FORWARD or REVERSE keyword. Use the SET (FORWARD) and SET (REVERSE) built-in procedures to establish or change this parameter."eob_text"
Returns a string that represents the end-of-buffer text. Use the SET (EOB_TEXT) built-in procedure to establish or change this parameter."erase_unmodifiable"
Returns 1 if unmodifiable records can be erased from the specified buffer and returns 0 if the records cannot be erased."file_name"
Returns a string that is the name of a file given as the second parameter to CREATE_BUFFER. Returns the null string if none was specified."first_marker"
Returns the first marker in DECTPU's internal list of markers for the buffer. Returns 0 if there is none. You must use GET_INFO (buffer_variable, "first_marker" before the first use of GET_INFO (buffer_variable, "next_marker"). If you do not follow this rule, GET_INFO (buffer_variable, "next_marker") returns 0.There is no corresponding "last_marker or "prev_marker" parameter.
Do not write code that relies on DECTPU storing markers in one particular order. Creating markers or ranges may alter the internal order.
"first_range"
Returns the first range in DECTPU's internal list of ranges for the buffer. Returns 0 if there are none. You must use GET_INFO (buffer_variable, "first_range") before you use GET_INFO (buffer_variable,"next_range") or the "next_range" parameter returns 0.There is no corresponding "last_range" or "prev_range" parameter.
Do not write code that relies on DECTPU storing ranges in one particular order. Creating markers or ranges may alter the internal order.
"journaling"
Returns 1 if the specified buffer is being journaled or returns 0 if it is not."journal_file"
Returns a string that is the name of the journal file for the specified buffer. If the buffer is not being journaled, the call returns 0."journal_name"
Converts a buffer's name to a journal file name by using the DECTPU default journal file name algorithm. DECTPU converts the buffer name to a journal file name regardless of journaling status. The GET_INFO call does not require journaling to be turned on for the specified buffer. For more information on this algorithm, see the Guide to the DEC Text Processing Utility."key_map_list"
Returns a string that is the key map list bound to the buffer. Use the SET built-in procedure to establish or change this parameter."left_margin"
Returns an integer that is the current left margin setting. Use the SET (LEFT_MARGIN) built-in procedure to establish or change this parameter."left_margin_action"
Returns a program or learn sequence that specifies what DECTPU should do if you try to insert text to the left of the left margin. Returns the UNSPECIFIED keyword if no left margin action routine has been set. Use the SET (LEFT_MARGIN_ACTION) built-in procedure to establish or change this parameter."line"
Returns a string that is the line of text at the editing point for the buffer."map_count"
Returns an integer that is the number of windows associated with the buffer."max_lines"
Returns an integer that is the maximum number of records (lines) in the buffer. Use the SET built-in procedure to establish or change this parameter."middle_of_tab"
Returns an integer (1 or 0) that indicates whether the editing point is located in the white space within a tab."mode"
Returns the INSERT or OVERSTRIKE keyword. Use the SET (INSERT) and SET (OVERSTRIKE) built-in procedures to establish or change this parameter."modifiable"
Returns an integer (1 or 0) that indicates whether the buffer is modifiable."modified"
Returns an integer (1 or 0) that indicates whether the buffer has been modified."move_vertical_context"
Returns the encoded integer that describes the column where DECTPU attempts to position the cursor during MOVE_VERTICAL operations. See the SET (MOVE_VERTICAL_CONTEXT) built-in procedure for more information."name"
Returns a string that is the name given to the buffer when it was created."next_marker"
Returns the next marker in DECTPU's internal list of markers for the buffer. Returns 0 if there are no more. You must use GET_INFO (buffer_variable, "first_marker") before you use GET_INFO (buffer_variable, "next_marker") or the "next_marker" parameter returns 0.There is no corresponding "last_marker" or "prev_marke" parameter.
Do not write code that relies on DECTPU storing markers in one particular order. Creating markers or ranges may alter the internal order.
"next_range"
Returns the next range in DECTPU's internal list of ranges for the buffer. Returns 0 if there are no more. You must use GET_INFO (buffer_variable, "first_range") before you use GET_INFO (buffer_variable, "next_range") or the "next_range" parameter returns 0.There is no corresponding "last_range" or "prev_range" parameter.
Do not write code that relies on DECTPU storing ranges in one particular order. Creating markers or ranges may alter the internal order.
"no_write"
Returns an integer (1 or 0) that indicates whether the buffer should be written to a file at exit time. DECTPU writes the buffer to a file only if the buffer has been modified during the editing session. Use the SET (NO_WRITE) built-in procedure to establish or change this parameter."offset"
Returns an integer that is the number of characters between the left margin and the editing point. The left margin is counted as character 0. A tab is counted as one character, regardless of width. Window shifts have no effect on the value returned when you use "offset". The value returned has no relation to the visible screen column in which a character is displayed."offset_column"
Returns an integer that is the screen column in which DECTPU displays the character at the editing point. When calculating this value, DECTPU does not take window shifts into account; DECTPU assumes that any window mapped to the current buffer is not shifted. The value returned when you use "offset_column" reflects the location of the left margin and the width of tabs preceding the editing point. In contrast, the value returned when you use "offset" is not affected by the location of the left margin or the width of tabs."output_file"
Returns a string that is the name of the file used with the SET (OUTPUT_FILE) built-in procedure. Returns 0 if there is no output file associated with the specified buffer. Use the SET (OUTPUT_FILE) built-in procedure to establish or change this parameter."permanent"
Returns an integer (1 or 0) that indicates whether the buffer is permanent or can be deleted. Use the SET (PERMANENT) built-in procedure to establish or change the parameter."read_routine"
Use with DECwindows only.Returns the program or learn sequence that DECTPU executes when it owns a global selection and another application has requested information about that selection. If the application has not specified a global selection read routine, 0 is returned.
GLOBAL_SELECT is a keyword indicating that the built-in is to return the global selection read routine. When you use "read_routine" as the second parameter to this built-in, you must use the GLOBAL_SELECT keyword as the third parameter, as follows:
GET_INFO (buffer_variable, "read_routine", GLOBAL_SELECT)"record_count"
Returns an integer that is the number of records (lines) in the buffer. GET_INFO (buffer, "record_count") does not count the end-of-buffer text as a record, but GET_INFO (marker, "record_number") does if the specified marker is on the end-of-buffer text. Thus, the maximum value returned by GET_INFO (buffer, "record_count") is one less than the maximum value returned by GET_INFO (marker, "record_number") if the specified marker is on the end-of-buffer text."record_number"
Returns the record number of the editing point."record_size"
Returns an integer that is the maximum length for records (lines) in the buffer."right_margin"
Returns an integer that is the current right margin setting. Use the SET (RIGHT_MARGIN) built-in procedure to establish or change the parameter."right_margin_action"
Returns a program or learn sequence that specifies what DECTPU should do if you try to insert text to the right of the right margin. Returns the UNSPECIFIED keyword if the buffer does not have a right margin action.
Previous Next Contents Index
Copyright © Compaq Computer Corporation 1998. All rights reserved.
Legal6020PRO_011.HTML