% Librarian I01-42;'I=; %5 OLABORTM ADD_KEY_MAPP^ ADJUST_WINDOWS`ANCHORVANYXANYLX APPEND_LINEZHARB[LASCII_PATTACH` BEGINNING_OFBOOLEAN_EXPRESSIONSaX CALL_USERb CHANGE_CASECommandskCOMPILEnCONVERTt COPY_TEXTx CREATE_ARRAY{ CREATE_BUFFERtCREATE_KEY_MAPCREATE_KEY_MAP_LISTDEBUGGER'ERROR_HANDLERS,XKEYMAPS_AND_KEYMAP_LISTS9Keynames_Table?Nondefinable_KeysDRecovery TPUaCREATE_KEY_MAP_LISTCREATE_PROCESS CREATE_RANGE CREATE_WIDGET\ CREATE_WINDOWCURRENT_BUFFERCURRENT_CHARACTERCURRENT_COLUMNCURRENT_DIRECTION: CURRENT_LINECURRENT_OFFSET CURRENT_ROWCURRENT_WINDOWTCURSOR_HORIZONTAL6CURSOR_VERTICALDEBUGGER DEBUG_LINEn DEFINE_KEY'ERROR_HANDLERS,XKEYMAPS_AND_KEYMAP_LISTS9Keynames_Table?Nondefinable_KeysDRecovery TPUwCREATE_KEY_MAP DEBUG_LINEGET_GLOBAL_SELECTGET_INFO(KEY_MAP)GET_INFO(WIDGET_VARIABLE) LOOKUP_KEY READ_GLOBAL_SELECT SET(ACTIVE_AREA)SET(ERASE_UNMODIFIABLE)SET(INPUT_FOCUS)SET(MESSAGE_ACTION_LEVEL) SET(PRE_KEY_PROCEDURE)NSET(SHIFT_KEY)SET(WIDGET_CONTEXT_HELP)WRITE_GLOBAL_SELECTgn DEFINE_KEYzDEFINE_WIDGET_CLASSDELETElEDITEND_OFERASEERASE_CHARACTER ERASE_LINEERROR'ERROR_HANDLERS ERROR_LINE ERROR_TEXT:EXECUTEEXIT EXPAND_NAMElFAO8 FILE_PARSE FILE_SEARCHFILL| GET_CLIPBOARD GET_DEFAULTnGET_GLOBAL_SELECTGET_INFO,XKEYMAPS_AND_KEYMAP_LISTS9Keynames_Table?Nondefinable_KeysDRecovery TPUUGET_INFO&GET_INFO(ANY_KEYNAME)GET_INFO(ANY_KEYWORD) GET_INFO(ANY_VARIABLE) GET_INFO(ARRAY) GET_INFO(ARRAY_VARIABLE)GET_INFO(BUFFER)bGET_INFO(BUFFER_VARIABLE)*GET_INFO(COMMAND_LINE)4*GET_INFO(DEBUG)9GET_INFO(DEFINED_KEY)=GET_INFO(GLOBAL_SELECT)>GET_INFO(KEY_MAP)AGET_INFO(KEY_MAP_LIST),XKEYMAPS_AND_KEYMAP_LISTS9Keynames_Table?Nondefinable_KeysDRecovery TPUYAGET_INFO(KEY_MAP_LIST)CBGET_INFO(MARKER_VARIABLE)IGET_INFO(MOUSE_EVENT_KEYWORD)N GET_INFO(PROCEDURES)PGET_INFO(PROCESS)S`GET_INFO(PROCESS_VARIABLE)TGET_INFO(RANGE_VARIABLE)VGET_INFO(SCREEN)wGET_INFO(STRING_VARIABLE)&GET_INFO(SYSTEM)RGET_INFO(WIDGET)\GET_INFO(WIDGET_VARIABLE)GET_INFO(WINDOW),XKEYMAPS_AND_KEYMAP_LISTS9Keynames_Table?Nondefinable_KeysDRecovery TPU[GET_INFO(WINDOW)GET_INFO(WINDOW_VARIABLE) HELP_TEXTINDEXINT* JOURNAL_CLOSE. JOURNAL_OPEN,XKEYMAPS_AND_KEYMAP_LISTS9Keynames_TableKEY_NAMEpLAST_KEY4 LEARN_ABORT LEARN_BEGIN LEARN_ENDLENGTH@ LINE_BEGINLINE_END LOCATE_MOUSEd LOOKUP_KEY LOWER_WIDGET MANAGE_WIDGETMAPXMARKMATCH?Nondefinable_Keys@ RAISE_WIDGETDRecovery TPUd LOWER_WIDGET MANAGE_WIDGETMAPXMARKMATCHMESSAGE MESSAGE_TEXT  MODIFY_RANGExMOVE_HORIZONTAL MOVE_TEXT MOVE_VERTICAL?Nondefinable_KeysNOTANY"dNOTANYL#tPOSITION+*QUIT@ RAISE_WIDGET.r READ_CHAR1READ_CLIPBOARD3 READ_FILE6READ_GLOBAL_SELECT<READ_KEY>R READ_LINEBREALIZE_WIDGETDRecoveryCRECOVER_BUFFERMREFRESHO2REMAIN TPU[<READ_KEY>R READ_LINEBREALIZE_WIDGETDRecoveryCRECOVER_BUFFERMREFRESHO2REMAINP0REMOVE_KEY_MAPSRETURNWxSAVE]SCANeSCANLnSCROLLrSEARCHzSEARCH_QUIETLYSELECT SELECT_RANGESENDSEND_CLIENT_MESSAGESEND_EOFSETSET(ACTIVE_AREA)SET(AUTO_REPEAT) SET(BELL)*SET(CLIENT_MESSAGE) SET(COLUMN_MOVE_VERTICAL)SET(CROSS_WINDOW_BOUNDS) TPU 73;1 TPU TPU' Executes a TPU procedure or statement. Examples:+ Commands EffectsI ---------------------------------------------------------------------E TPU COPY_TEXT (FAO ("!%D",0)) Enters the current date and time.I TPU SHOW (PROCEDURES) Lists all the built-in procedures andA any user-compiled procedures.H EXTEND EVE user_proc Compiles a procedure named USER_PR OCE TPU user_proc and then executes that procedure.J TPU EVE$EDT_CHNGCASE Executes the EVE procedure for the EDT< ChngCase key (GOLD-KP1). Usage notes:B o Procedure names are not case-sensitive (you can use uppercase,I lowercase, or mixed case). However, the TPU command does NOT let you/ abbreviate the procedure name or statement.K o Messages from executing the procedure appear in the message window (th eE bottom line of the EVE screen layout). To read the messages moreI easily|---|particularly if there are several error messages|---|splitK the EVE window in two and put the message buffer in one of the windows.D For more information about this, see EVE help on Message Buffer.L +-------------------------------------------------------------------------+L | For a list of TPU built-ins and topics, see help on TPU List Of Topics. |L |  |L | To return to help on EVE commands and other topics, see help on EVE. |L +-------------------------------------------------------------------------+ww73; 1 Commands List of TopicsF For help on DECTPU topics, type the name of a topic and press RETURN. ~I~: o To exit from help and resume editing, press RETURN. Text-Manipulation Statements; APPEND_LINE ERASE MOVE_TEXT; BEGINNING_OF  ERASE_CHARACTER READ_FILE8 CHANGE_CASE ERASE_LINE SEARCH> COPY_TEXT FILE_PARSE SELECT_RANGE< CREATE_BUFFER FILE_SEARCH SPLIT_LINE; CREATE_RANGE FILL TRANSLATE< EDIT MODIFY_RANGE WRITE_FILE END_OF0 Cursor-Movement and Editing-Position Statements9 CURSOR_HORIZONTAL MARK POSITION7 CURSOR_VERTICAL MOVE_HORIZONTAL SCROLL' LOCATE_MOUSE MOVE_VERTICAL Key-Definition Statements7 ADD_KEY_MAP DEFINE_KEY LOOKUP_KEY; CREATE_KEY_MAP KEY_NAME REMOVE_KEY_MAP9 CREATE_KEY_MAP_LIST LAST_KEY UNDEFINE_KEY? Program-Execution Statements Multiple-Process StatementsE COMPILE ATTACH SEND_EOFB EXECUTE CREATE_PROCESS SPAWN* SAVE  SENDH Pattern-Match Statements Screen- and Window-Layout Statements? ANCHOR SCANL ADJUST_WINDOW REFRESH= ANY SEARCH CREATE_WINDOW SHIFT= ARB SEARCH_QUIETLY LOCATE_MOUSE UNMAP> MATCH SPAN MAP UPDATE NOTANY SPANL SCAN UNANCHOR Status-Information Statements7 CURRENT_BUFFER GET_INFO(DEFIN ED_KEY)< CURRENT_CHARACTER GET_INFO(INTEGER_VARIABLE)3 CURRENT_COLUMN GET_INFO(KEY_MAP)8 CURRENT_DIRECTION GET_INFO(KEY_MAP_LIST); CURRENT_LINE GET_INFO(MARKER_VARIABLE)? CURRENT_OFFSET GET_INFO(MOUSE_EVENT_KEYWORD)6 CURRENT_ROW GET_INFO(PROCEDURES)3 CURRENT_WINDOW GET_INFO(PROCESS)< GET_INFO GET_INFO(PROCESS_VARIABLE): GET_INFO(ANY_KEYNAME) GET_INFO(RANGE_VARIABLE)2 GET_INFO(ANY_KEYWORD) GET_INFO(SCREEN); GET_INFO(ANY_VARIABLE) GET_INFO(STRING_VARIABLE)2 GET_INFO(ARRAY) GET_INFO(SYSTEM)2 GET_INFO(ARRAY_VARIABLE) GET_INFO(WIDGET); GET_INFO(BUFFER) GET_INFO(WIDGET_VARIABLE)2 GET_INFO(BUFFER_VARIABLE) GET_INFO(WINDOW); GET_INFO(COMMAND_LINE) GET_INFO(WINDOW_VARIABLE)& GET_INFO(DEBUG) SHOW SET Statements: SET  SET(MESSAGE_ACTION_TYPE)4 SET(ACTIVE_AREA) SET(MESSAGE_FLAGS)1 SET(AUTO_REPEAT) SET(MODIFIABLE)/ SET(BELL) SET(MODIFIED), SET(CLIENT_MESSAGE) SET(MOUSE)< SET(COLUMN_MOVE_VERTICAL) SET(MOVE_VERTICAL_CONTEXT)/ SET(CROSS_WINDOW_BOUNDS) SET(NO_WRITE)2 SET(DEBUG) SET(OUTPUT_FILE)1 SET(DEFAULT_DIRECTORY) SET(OVERSTRIKE)* SET(DEFAULT_FILE) SET( PAD): SET(DETACHED_ACTION) SET(PAD_OVERSTRUCK_TABS)0 SET(DISPLAY_VALUE) SET(PERMANENT)9 SET(DRM_HIERARCHY) SET(POST_KEY_PROCEDURE)8 SET(ENABLE_RESIZE) SET(PRE_KEY_PROCEDURE)2 SET(EOB_TEXT) SET(PROMPT_AREA)7 SET(ERASE_UNMODIFIABLE) SET(RECORD_ATTRIBUTE)4 SET(FACILITY_NAME) SET(RESIZE_ACTION). SET(FIRST_INPUT_ACTION SET(REVERSE)3 SET(FORWARD) SET(RIGHT_MARGIN): SET( GLOBAL_SELECT) SET(RIGHT_MARGIN_ACTION)4 SET(GLOBAL_SELECT_GRAB) SET(SCREEN_LIMITS)4 SET(GLOBAL_SELECT_READ) SET(SCREEN_UPDATE)1 SET(GLOBAL_SELECT_TIME) SET(SCROLL_BAR)< SET(GLOBAL_SELECT_UNGRAB) SET(SCROLL_BAR_AUTO_THUMB)0 SET(HEIGHT) SET(SCROLLING)2 SET(ICON_NAME) SET(SELF_INSERT)0 SET(ICON_PIXMAP) SET(SHIFT_KEY); SET(ICONIFY_PIXMAP) SET(SPECIAL_ERROR_SYMBOL)2 SET(INFORMATIO NAL) SET(STATUS_LINE). SET(INPUT_FOCUS) SET(SUCCESS)- SET(INPUT_FOCUS_GRAB) SET(SYSTEM)0 SET(INPUT_FOCUS_UNGRAB) SET(TAB_STOPS)+ SET(INSERT) SET(TEXT), SET(JOURNALING) SET(TIMER)0 SET(KEY_MAP_LIST) SET(TRACEBACK)* SET(KEYSTROKE_RECOVERY) SET(UID)4 SET(LEFT_MARGIN) SET(UNDEFINED_KEY), SET(LEFT_MARGIN_ACTION) SET(VIDEO)- SET(LINE_NUMBER) SET( WIDGET)6 SET(MAPPED_WHEN_MANAGED) SET(WIDGET_CALLBACK)7 SET(MARGINS) SET(WIDGET_CALL_DATA): SET(MAX_LINES) SET(WIDGET_CONTEXT_HELP)< SET(MENU_POSITION) SET(WIDGET_RESOURCE_TYPES), SET(MESSAGE_ACTION_LEVEL) SET(WIDTH) DECwindows-Related Statements> CREATE_WIDGET LOWER_WIDGET REALIZE_WIDGETC DEFINE_WIDGET_CLASS MANAGE_WIDGET SEND_CLIENT_MESSAGE? GET_CLIPBOARD RAISE_WIDGET  UNMANAGE_WIDGET? GET_DEFAULT READ_CLIPBOARD WRITE_CLIPBOARDC GET_GLOBAL_SELECT READ_GLOBAL_SELECT WRITE_GLOBAL_SELECT Miscellaneous Statements@ ABORT ERROR_LINE JOURNAL_CLOSE QUITE ASCII ERROR_TEXT JOURNAL_OPEN READ_CHARD CALL_USER EXPAND_NAME LEARN_ABORT READ_KEYE CONVERT EXIT LEARN_BEGIN READ_LINEJ CREATE_ARRAY FAO  LEARN_END RECOVER_BUFFERA DEBUG_LINE HELP_TEXT LENGTH SLEEP? DELETE INDEX MESSAGE STRB ERROR INT MESSAGE_TEXT SUBSTR Informational Topics8 Boolean Expressions Keynames Table; Debugger Nondefinable Keys2 Error Handlers Recovery Keymaps and Keymap Listsww^3;1 BOOLEAN_EXPRESSIONS BOOLEAN EXPRESSIONSG In DECTPU, all odd integers can be used to represent the Boolean valueG TRUE, and all even integers can be used to represent the Boolean value FALSE.I DECTPU evaluates Boolean expressions by performing logical operations onG the operands one bit at a time. For example, if DECTPU encounters theI expression 7 AND 9, it performs four AND operations, evaluating each bit2 of 7 with the corresponding bit of 9, as follows: 0 1 1  1 AND AND AND AND 1 0 0 1 --------------------- 0 0 0 1C In this example, the four bits produced by the four AND operationsJ evaluate to 1. Since odd values are TRUE, the result of 7 and 9 could be* used to represent the Boolean value TRUE.K When executing a Boolean expression, DECTPU evaluates expressions enclosedE in parentheses before other elements. When using multiple operatorsH (logical or otherwise) in one expression, you should use parentheses toH ensure that the compiler evaluates expressions in the order you intend.B For example, the following IF clause shows how to parenthesize an= expression containing both logical and relational operators: IF (x = 12) AND (y <> 40)ww^3; 1 DEBUGGER DEBUGGER8 DECTPU provides a debugger called TPU$DEBUG , stored inB SYS$SHARE:TPU$DEBUG.TPU, or you can use a debug file of your own.J To invoke DECTPU with the debugger, use /DEBUG and option ally specify theJ debug file you want to use. DECTPU then executes the file containing theJ debugger before executing either TPU$INIT_PROCEDURE or the file specifiedD with the /COMMAND qualifier. For more information, see DCL HELP on EDIT/TPU/DEBUG.E When you use TPU$DEBUG.TPU, DECTPU places the debugger window on theI screen. To set a breakpoint in the file you are debugging, press DO andB issue debugger command SET BREAKPOINT followed by the name of theI procedure where the breakpoin t is to be set. For example, if you wantedH to set a breakpoint at the procedure FUM, you would issue the following command: SET BREAKPOINT fumD After setting a breakpoint, use the command GO to switch control ofD execution from the debugger program to DECTPU. You also use the GOJ command to look at the code you are debugging before setting breakpoints.H The screen displays the file you specified on the DCL command line, andF EVE commands are available. To return to the debugge !r so you can set< breakpoints, use the command DEBUG at the EVE command line.G To compile all code in the buffer, use the EVE command EXTEND ALL. To@ execute a procedure after compilation, use the EVE command TPU.I When DECTPU encounters the first breakpoint in the session, the code youG are debugging has not yet been placed in the debugger's source buffer.K The debugger prompts for the name of the file containing your code. UsingC your response, the debugger places your code in its s"ource buffer.I Once you have set breakpoints, compiled code, and started execution, you* can use following commands for debugging: ATTACH [process]I Suspends the current editing session and transfers control to another< active process or subprocess. (See EVE help on ATTACH.)! CANCEL BREAKPOINT procedure-name= Cancels a breakpoint set with the SET BREAKPOINT command. DEPOSIT variable := expressionK Lets you set the value of global variables, local variables,# and formal parameters. DISPLAY SOURCEI Clears text from the screen after use of the HELP or SHOW BREAKPOINTSF command. Causes the source display area to display your code. By< default, TPU$DEBUG.TPU defines CTRL/Z as DISPLAY SOURCE. EXAMINE variableG Displays the current contents of global and local variables, global? constants, formal parameters of the procedure that has beenH interrupted, and variables local to that procedure. Local constants $cannot be examined. GOF Causes the debugger to relinquish control of execution until it isJ invoked again by a breakpoint, by the DEBUG command, or by the DEBUGON procedure. HELP9 Lists available debugger command and keypad bindings. QUIT Quits the debugger. SCROLL [-] number-of-linesF Scrolls text in the source display area by the specified number ofF lines. To scroll back through the code in the display area, use aJ negative value. a % negative number of lines. To scroll forward by oneH line less than the number of lines in the display window, press NEXTJ SCREEN or GOLD/DOWN arrow. To scroll back in the same way, press PREV SCREEN or GOLD/UP arrow. SET BREAKPOINT procedure-nameB Invokes the debugger when the specified procedure is executed.& SET WINDOW top-line-number, lengthH Puts the top of the debugger window at the line number specified andH extends the window down by the second number s &pecified. The defaultF length is 7 lines. The minimum length is 3 lines. The SET WINDOWI command only changes the size of the source display area. The output9 area and command line always occupy exactly one line. SHIFT [-] number-of-columnsK Moves the source display window left or right across the source code toF display text wider than the screen. To move left, press GOLD/LEFTJ arrow, then enter the number of columns to move. To move right, press? GOLD/RIGHT' arrow, then enter the number of columns to move. SHOW BREAKPOINTSD Lists the current breakpoints in the debugger source window. ToI re-display code in the source window, use the DISPLAY SOURCE command. SPAWN [command-string]H Suspends the current editing session and creates a subprocess. (See EVE help on SPAWN.) STEPK Executes one line of DECTPU code, then returns control to the debugger.I If you have several DECTPU statements on one line, all state(ments are4 executed before control returns to the debugger. TPU statementB Executes the DECTPU statement you specify. (See help on TPU.) Related Topics DEBUG_LINE SET(DEBUG)ww^3;1 ERROR_HANDLERS Error HandlersI An error handler is a block of code containing statements to be executedH if DECTPU generates a warning or an error. Error handlers are optionalC and may be used either in procedures or in programs. When used inG programs (outside ) procedures) they must be placed after all the globalD declarations of constants, variables and procedures, and before anyC executable statements. Only one error handler can be used in eachJ procedure, and only one one can be used per program (outside procedures).F DECTPU error handlers are not usually recursive; that is, they do notH apply their own statements to errors that arise while the error handlerK itself is being executed. However, CTRL/C routines are an exception; they ARE rec*ursive." Types of Error Handlers in DECTPUI DECTPU has two types of error handlers: procedure-style and case-style.K The following example shows the syntax of a procedure-style error handler: ON_ERROR MESSAGE (ERROR_TEXT);4 MESSAGE ("Error on line " + STR (ERROR_LINE)); RETURN; ENDON_ERRORF The following example shows the syntax of a case-style error handler: ON_ERROR [TPU$_CONTROLC]: MESSAGE (ERROR_TEXT); RETUR+N (LEARN_ABORT); [OTHERWISE]: MESSAGE( ERROR_TEXT); RETURN; ENDON_ERRORF Case-style error handlers are similar to DECTPU case statements. The3 statements in the handler have the general format:C [error-keyword1,...error-keywordn] : statement1;...statementn;G The the selectors on the left-hand side of the colon in each statement! must be either of the following:3 o DECTPU keywords indentifying errors or warnings o The keyword OTHERWIS,E9 Case-style error handlers allow you to do the following:! o Trap the TPU$_CONTROLC statusK o Specify an [OTHERWISE] selector specifying how to handle all errors andD warnings that are not covered by specific selectors in the error handler.2 o Suppress display of error and warning messagesK For more information on using error handlers, please refer to the DEC Text Processing Utility Manual. Related Topics? CALL_USER ERROR ERROR_LINE ERROR_TEXT - LEARN_ABORT8 MESSAGE MESSAGE_FLAGS MESSAGE_TEXT RETURNww'3;1 KEYMAPS_AND_KEYMAP_LISTS KEYMAPS AND KEYMAP LISTSJ Key maps and key-map lists let you manipulate a set of key definitions asJ a unit rather than individually. For example, key maps make it easier to= implement a command that defines all the keys on the keypad.J A key map is a set of key definitions. DECTPU supplies a default key mapI called TPU$KEY_MAP. To create a key map other than. the default, use theG CREATE_KEY_MAP built-in. To add key definitions to a key map, use theK DEFINE_KEY built-in. To see a list of all key maps that have been defined/ by a program, use the SHOW(KEY_MAPS) built-in.J Key maps may be stored in one or more key-map lists. A key-map list is a$ structure containing the following:4 o Key maps ordered in the sequence you specifyJ o Additional information specifying how DECTPU should respond to the user's keystrokesK / DECTPU supplies a default key map list called TPU$KEY_MAP_LIST. To createE a list other than the default, use the CREATE_KEY_MAP_LIST built-in.+ Key-map lists are stored in section files.G To use a key map, you must first put it in a key-map list, even if youK only want to use one key map in your program. To add a key map to a list,I use the ADD_KEY_MAP built-in. You can add the same key map to more thanI one list. You may want to do so if you want different buffers to handleK key0strokes in different ways. For example, suppose you had an applicationE in which you wanted one buffer that would display all self-insertingJ characters and another buffer that would disable all self-inserting keys.I Suppose, too, that you wanted the user's key definitions to work in bothJ buffers. In such a case, you would add the key map containing the user'sC key definitions to the key-map lists associated with both buffers.I When adding key maps to a key-map list, you must specify wh 1ether the mapI is added to the beginning or the end of the list. When you add a map toH the beginning of the list, the keys defined in the map override the keyK definitions in all other maps in the list. If you add the map to the end,J its key definitions take effect only for keys that are not defined in theK other key maps. To obtain the first, last, next, or previous key map in a5 key map list, use the GET_INFO(KEY_MAP...) built-in.I A key-map list controls what happens in a buffer 2when the user presses aF key. To have an effect, a key-map list must be bound to a buffer. AI buffer can only have one key-map list bound to it at a time. However, aJ given key-map list can be bound to more than one buffer at a time. EveryJ buffer must have a key-map list bound to it, but not every key map has toI be bound to a buffer. There may be points in your program where a given) key-map list is not bound to any buffer.F By default, each newly-created buffer is bound to the def 3ault key mapI list, TPU$KEY_MAP_LIST. To change the key-map list to which a buffer isK bound, use the SET(KEY_MAP_LIST...) built-in. A buffer remains bound to aJ key-map list regardless of whether the buffer is displayed on the screen.H To see a list of all key-map lists that have been defined by a program,K use the SHOW(KEY_MAP_LISTS) built-in. To obtain the current, first, last,< next, or previous key map list in the section file, use the$ GET_INFO(KEY_MAP_LIST...) built-in.G When 4the user presses a key, DECTPU uses the information stored in theG key-map list bound to the current buffer to determine what to do. The: order in which DECTPU uses the information is as follows:H 1. DECTPU determines whether the key pressed is the "shift" key (orK GOLD key). If so, no action is taken until another key is pressed.H 2. If the key is not the "shift" key, DECTPU checks the key maps toH see if the key is defined. DECTPU looks through the key maps inB 5 order and uses the first definition of a given key that it encounters.H 3. If the key is defined, DECTPU checks whether a pre-key executionG procedure has been stored in the key-map list by use of the SETD (PRE_KEY_PROCEDURE...) built-in. If so, DECTPU executes theK procedure. Next, DECTPU executes the code bound to the key. AfterG executing that code, DECTPU checks whether a post-key executionK procedure has been stored in the key 6-map list. If so, the post-key( execution procedure is executed.K 4. If the key is not defined, DECTPU checks whether the key pressed isE the key for a printable character. If so, the program checksJ whether the SET (SELF_INSERT...) built-in is set to ON or OFF. IfF SELF_INSERT is set to ON, DECTPU displays the character on theK screen. If SELF_INSERT is set to OFF, DECTPU takes whatever action< is specified by the SET (UNDEFINED_KEY...) b 7uilt-in.G 5. If the key is not for a printable character and is not defined,< DECTPU takes whatever action is specified by the SET$ (UNDEFINED_KEY...) built-in.J To remove a key map from a key-map list, use the REMOVE_KEY_MAP built-in.I A key map is not destroyed even if it is removed from all key-map lists.I Likewise, a key-map list is not destroyed even if all key maps have been removed from it.I If you are extending or layering on top of EVE, note the following 8about) EVE usage of key maps and key-map lists:J o In EVE, the name of a key map is not the same as the variable that< contains the key map. For example, the EVE variableG EVE$X_USER_KEYS contains the key map named EVE$USER_KEYS, which* stores the user's key definitions.@ o EVE stores all its key maps in the default key-map list,H TPU$KEY_MAP_LIST. However, the default key map, TPU$KEY_MAP, isI removed from the default key-map list by the s9tandard EVE section file.D o The order of key maps in the EVE key map list depends on the" terminal type, as follows:> VT200 Key Map Order VT100 Key Map Order= ------------------- ------------------9 EVE$X_USER_KEYS EVE$X_USER_KEYS: EVE$X_MOUSE_KEYS EVE$X_VT100_KEYS= EVE$X_VT200_KEYS EVE$X_STANDARD_KEYS EVE$X_STANDARD_KEYS Related Top:icsC ADD_KEY_MAP CREATE_KEY_MAP CREATE_KEY_MAP_LIST> DEFINE_KEY GET_INFO REMOVE_KEY_MAPG SET(KEY_MAP_LIST) SET(PRE_KEY_PROCEDURE) SET(POST_KEY_PROCEDURE)4 SET(SELF_INSERT) SET(UNDEFINED_KEY) SHOWww'3;1 Keynames_Table Keynames TableH The following tables show DECTPU keynames for the corresponding keys on& the LK201 and VT100-series keyboards:5 DECTPU Keynames for the Editing and Auxiliary Keypad5 = ;===================================================( Keyboard marking0 Keyname LK201 VT100-series0 --------------------------------------------' PF1 PF1 PF1' PF2 PF2 PF2' PF3 PF3 PF3' PF4 PF4 PF4+ KP0,...,KP9 0,...,9 0,...,9% PERIOD . .% COMMA , ,% MINUS < - -) ENTER Enter ENTER, UP Up arrow Up arrow. DOWN Down arrow Down arrow. LEFT Left arrow Left arrow/ RIGHT Right arrow Right arrow E1 Find E2 Insert Here E3 Remove E4 Select E5 Prev Screen E6 Next Screen HELP Help DO Do F6,...,F =20 F6,...,F20F Note: Keys F1 through F5 are reserved by the operating system and= cannot be defined. See help on NONDEFINABLE KEYS.. DECTPU Keynames for Keys on the Main Keyboard. =============================================( Keyboard marking- Keyname LK201 VT100-series- -----------------------------------------$ TAB_KEY Tab TAB' RET_KEY Return RETURN' DEL_KEY DELETE LF_KEY LINE FEED BS_KEY BACK SPACE FS_KEY ----+ GS_KEY |; RS_KEY +--> See the programmer reference manual for< NUL_KEY | your terminal (VT220, Vt240, and so on). US_KEY ----+' CTRL_A_KEY CTRL/A CTRL/A$ : : :$ : : :' CTRL_Z_KEY CTRL/Z CTRL/ZJ Note: CTRL/A means you press and hold the CTRL key while you type the+ lette ?r A (upper- or lower-case). DECTPU Keynames for Mouse Keys ==============================G Each key on the mouse (or other pointing ___________________H device) is effectively two keys, which | _ _ _ |H are defined separately -- the down-stroke | | | | | | | |H (or press) and the up-stroke (or release) | | | | | | | |H -- as shown in the figure at the right: | | | | | | | |H @ | | | | | | | |H | |_| |_| |_| |H +-------------------+J M1DOWN M2DOWN M3DOWNH M1UP M2UP M3UP Related topics:9 DEFINE_KEY KEY_NAME NONDEFINABLE KEYS SHIFT_KEYww'3;1 Nondefinable_Keys Nondefinable KeysJ You can define al Al keys on the LK201 and VT100-series keyboards -- except the following:I BREAK COMPOSE CHARACTER CTRL (by itself) LOCK or CAPS LOCK* HOLD SCREEN SET-UP SHIFTC On the LK401 keyboard you also cannot define the ALT FUNCTION key.J While DECTPU does not prevent you from defining keys F1 through F5 or the= ESCAPE key, the code bound to these keys cannot be executed.K The PF1 key is the default DECTPU shift key. You cannot define PF1 unless> you specify a B different shift key by using SET(SHIFT_KEY...).C You can define and execute the following keys using the DECwindowsH interface. You can also define the keys on character-cell terminals --K although doing so is not recommended because you can execute the keys only- under special terminal settings, as follows:F CTRL/C, CTRL/O, To execute a procedure or program bound toK CTRL/X, and F6 one of these keys on a character-cell terminal,A you Cmust have entered the DCL command1 SET TERMINAL/PASTHRU.F CTRL/T and CTRL/Y To execute a procedure or program bound toD either of these keys on a character-cellK terminal, you must have entered the DCL commandK SET TERMINAL/PASTHRU or SET TERMINAL/NOCONTROL.F CTRL/Q and CTRL/S To execute a procedure or program bound toD either of these Dkeys on a character-cellK terminal, you must have entered the DCL command2 SET TERMINAL/NOTTSYNC.J Defining CTRL/M or RETURN affects the other as well. Similarly, defining) CTRL/I or TAB affects the other as well.H The EVE editor has the same restrictions as DECTPU, except EVE does notJ let you redefine RETURN, does not let you define typing keys (unless usedH with a modifier such as GOLD or CTRL), and lets you redefine the DO keyGE only if you have defined another key as DO. Also, EVE does not have aC default shift key (or GOLD key), so PF1 can be defined. (For more, information, see EVE help on SET GOLD KEY.) Related topics6 DEFINE_KEY KEY_NAME KEYNAMES TABLE SHIFT_KEYww'3; 1 Recovery RecoveryH If a system failure interrupts your editing session, you can usuallyK recover your work. DECTPU makes this recovery possible by allowing youK to record the keystrokes of yo Fur editing session in a keystroke journalI file, or changes made to buffers in buffer change journal files. YouK can recover edits from your entire editing session by recovering from aG keystroke journal file, or you can recover changes made to specificG buffers by recovering from one or more buffer change journal files.G o By default, DECTPU does not journal. The application layered onC DECTPU is responsible for processing the /JOURNAL qualifier.I o In EV GE, if you do not specify this qualifier, EVE does only bufferK change journaling. With this qualifier followed by a file name, EVEI does both buffer change and keystroke journaling. By default, theA keystroke journal file is created in your current, default* directory, with the file type .TJL.H o To give the keystroke journal file a different name or directory,J when you invoke EVE, use the /JOURNAL= and specify the journal file you want.9 Ho If you do not want any journaling, use /NOJOURNAL.H o To turn on keystroke journaling during an editing session (eitherJ because journaling was never started or was started and then turnedI off), use the JOURNAL_OPEN built-in. To stop keystroke journalingA during an editing session, use the JOURNAL_CLOSE built-in.K o To turn buffer change journaling on or off during an editing sessionC use the SET (JOURNALING) built-in. You can also use the SET@ I (JOURNALING) built-in to adjust the journaling frequency.K o Normally, the journal file is deleted automatically when you exit orK quit. However, if the system fails during your editing session, the journal file is saved.E To recover your edits from a journal file after a system failure,H reissue the DCL command you used for that editing session (includingJ all qualifiers) -- and adding the /RECOVER qualifier. For example, ifI the system failed when you J were editing a file called JABBER.TXT, you# type the following DCL command:$ $ EDIT/TPU jabber.txt/RECOVERK Note that for keystroke recovery to work, terminal characteristics mustI be the same as they were when you started the editing session. Also,D all input files must be in the same state as at the start of the editing session.G When you invoke DECTPU with the /RECOVER qualifier, DECTPU runs theJ journal file and recovers the edits you made up to the K point where theH system failed. (The last few keystrokes or operations may be lost.)J You can then resume the editing session. Any new edits are journaled.J Recovering from a buffer change journal file recovers only the changes made to that buffer.F The recovery may not work (or may not be accurate) if the originalI editing session included any of the following operations because theyJ do not necessarily behave the same the second time they are performed: Lo A CTRL/C sequence o A CTRL/T sequenceG o Cut and paste operation from a file accessed in a subprocess6 o Cut and paste operation from a mail message@ o An operation using the contents of the message buffer8 o An operation involving the CALL_USER built-inD o An operation using the date or time from the FAO built-inC It may be possible to edit a journal file, but DIGITAL does notH recommend this because you may alter or deMlete information necessary for the recovery to work.H For more information, see DCL HELP on EDIT/TPU/JOURNAL and /RECOVER. Related topics2 JOURNAL_CLOSE JOURNAL_OPEN SET(JOURNALING)ww73;1 ABORT ABORTF Stops any executing procedures and causes DECTPU to wait for the next keypress.K ABORT is a DECTPU language construct, not a built-in procedure. ABORT hasC no parameters or completion codes. You cannot use the EXPAND_NAME built-in on ABONRT. ExampleG The following error handler stops execution of any currently executing3 procedures and returns back to DECTPU's main loop: ON_ERROR/ MESSAGE ("Aborting because of error."); ABORT; ENDON_ERRORww73; 1 ADD_KEY_MAP ADD_KEY_MAP0 Adds one or more key maps to a key-map list. Syntax9 ADD_KEY_MAP (string1, {FIRST | LAST}, string2 [,...]) Parameters@ string1 Specifies the name of the key-map l Oist.K FIRST Specifies the key map is added to the beginning of* the key-map list.I LAST Specifies the key map is added to the end of the& key-map list.I string2 Specifies the name of the key map to be added toI the key-map list. You can specify more than oneI key map. Key maps are added to the key-map listK in Pthe order specified. The order of a key map inG a key-map list determines precedence among any5 conflicting key definitions. ExampleG These statements create a key map named HELP_KEYS and add it to theK default key-map list, TPU$KEY_MAP_LIST. Key definitions in the new key; map override those in the key maps already in the list.. help_keys := CREATE_KEY_MAP ("help_keys");9 ADD_KEY_MAP ("TPU$KEY_MAP_LIST", "first", heQlp_keys); Related TopicsG ADD_KEY_MAP CREATE_KEY_MAP CREATE_KEY_MAP_LISTB DEFINE_KEY GET_INFO REMOVE_KEY_MAPK SET(KEY_MAP_LIST) SET(PRE_KEY_PROCEDURE) SET(POST_KEY_PROCEDURE)H SET(UNDEFINED_KEY) SHOW Key Maps and Key Map Listsww73;1 ADJUST_WINDOW ADJUST_WINDOWH Changes the window size or screen location (or both). ADJUST_WINDOWJ causes the "original_top" anRd "original_bottom" lines defined when theI window is created to be permanently modified, making the changed lineG numbers the new "original" value of the window. Part or all of theH window may be redisplayed or scrolled so the current position at theK time of the adjustment remains visible. The window becomes the currentI window. The buffer mapped to that window becomes the current buffer. Syntax. ADJUST_WINDOW (window, integer1, integer2) ParametersJ Swindow The window whose size or location you want to change. This* becomes the current window.G integer1 The signed (+|-) integer value to be added to the screen4 line number at the top of the window.G integer2 The signed (+|-) integer value to be added to the screen7 line number at the bottom of the window. Example( ADJUST_WINDOW (main_window, -5, +5);K Enlarges the main window, adding 5 lines to the top of the windo Tw and 5H lines to the bottom of the window. If the screen line number at theJ top of the window is 11, this statement changes the screen line numberH to 6. (If you use this statement when the top line of the window isJ number 1, you get a warning message, and the top of the window remains at screen line number 1.)ww73;1 ANCHOR ANCHORI Causes a search to try to match the pattern following ANCHOR startingC at the current character position. If U the match does not occurG immediately, the search does not skip over characters looking for a match.? ANCHOR is a keyword, not a built-in, and has no parameters.G By default, if a search fails to find a match for a pattern, DECTPUC moves the starting position for the search one character in theK direction of the search and starts the search again. If you use ANCHORJ as the first element of a pattern definition, SEARCH does not move theK starting position fo Vr the search. This means the search will not matchJ the pattern unless the pattern is encountered starting at the starting position of the search.K ANCHOR is useful only as the first element of a complex pattern. It is? legal elsewhere in a pattern definition, but has no effect. ExampleI The following assignment statement creates a pattern consisting of a,I 1, 2, and 3. If you used pat1 as a parameter to the SEARCH built-in,I the search would not move fromW character to character looking for the pattern.! pat1 := ANCHOR + 'a' + '123'; Related Topics& SEARCH SEARCH_QUIETLY UNANCHORww73;1 ANY ANYI Returns a pattern that will match one or more characters from the set5 of characters you specify in the first parameter. Syntax9 pattern := ANY ({string | range | buffer} [,integer]) ParametersD string A string in which you want ANY to match any$ X characters.C range A range in which you want ANY to match any$ characters.D buffer A buffer in which you want ANY to match any$ characters.B integer1 An integer indicating how many contiguousG characters ANY is to match. The default is 1. ExampleI The following assignment statement creates a pattern that matches anyA of the following two-letteYr combinations: xx, xy, yx, and yy pat1 := ANY ('xy', 2); Related Topics1 NOTANY SEARCH SEARCH_QUIETLY SPAN SPANLww73;1 ANYL ANYL+ The ANYL built-in is not yet available.A To return to help on EVE commands, type EVE and press RETURN./ For help on the keypad, press the HELP key.+ To exit from help, simply press RETURN.ww73; 1 APPEND_LINE APPEND_LINEJ Appends the current line to the end of the preZvious line. You can use+ APPEND_LINE to delete line terminators. Syntax APPEND_LINE Parameters none ExampleJ The following procedure deletes the character preceding the cursor; ifK you are at the beginning of a line, the current line is appended to the previous line: PROCEDURE user_delete_char IF CURRENT_COLUMN = 1 THEN APPEND_LINE; ELSE" ERASE_CHARACTER (-1); ENDIF; ENDPROEDURE; Related Topics SPLIT_LINE MOVE_TEXTww73;1 ARB ARBI Returns a pattern that matches an arbitrary sequence of characters ofE the length you specify. The characters themselves are arbitrary. Syntax pattern := ARB (integer) ParametersG integer The number of characters in the pattern, starting at the* current character position. Example pat1 := ARB (5);D Creates a pattern matching the nex\t 5 characters starting at the current character position.wwG3;1 ASCII ASCIIJ Returns the character or symbol in the DEC Multinational Character SetB corresponding to a given integer; or returns the integer valueJ associated with the a character; or returns a string consisting of the$ character associated with a key. SyntaxB {integer1 | string1} := ASCII ({integer2 | string2 | keyword}) ParametersJ integer1 The ASCII val ]ue returned by the ASCII built-in if8 you specify a string parameter.H string1 The character returned by the ASCII built-in ifE you specify an integer or keyword parameter.D integer2 The decimal value of a character in the DEC5 Multinational Character Set.H string2 A character whose ASCII value you want. If youJ specify a string longer than one ^character, ASCIIB returns the value of the first character.A keyword The name of a key for which you want theJ associated character. If you specify the keynameI of a key that is not associated with a printableK character, ASCII returns the character whose ASCII$ value is 0. ExamplesI 1. The following assignment statement assigns a string consis_ting ofH the form feed character (ASCII 12) to the variable MY_CHARACTER:# my_character := ASCII (12);G 2. The following assignment statement assigns the integer value 975 (the letter "a") to the variable ASCII_VALUE:# ascii_value := ASCII ('a');I 3. The following code fragment assigns to the variable KEY_VALUE theF character associated with the key most recently pressed by the user: key_struck := READ_KEY;( `key_value := ASCII (key_struck); Related Topics READ_KEYwwG3;1 ATTACH ATTACHK Deassigns the terminal and switches control from the current process to! a previously created process. Syntax! ATTACH [({integer | string})] ParametersJ integer The process identification of the process to which terminal> control will be switched. Use decimal numbers.F string The process to which terminal control will be switcahed.K Process names are case-sensitive. Put the string in quotes. Example ATTACH ("Joyce_2");5 Switches terminal control to the process Joyce_2. Related topics, CREATE_PROCESS SEND SEND_EOF SPAWNwwG3;1 BEGINNING_OF BEGINNING_OFE Returns a marker that points to the first position of a buffer orI range. If you use the marker returned by BEGINNING_OF as a parameterJ for the POSITION built-in, the current charactber position goes to this marker. Syntax- marker := BEGINNING_OF ({buffer | range}) Example+ beg_main := BEGINNING_OF (main_buffer);G This assignment statement stores the marker at the beginning of the) main buffer in the variable BEG_MAIN. Related Topics END_OF POSITION MARKwwG3; 1 CALL_USER CALL_USERC Calls a program written in another language from within DECTPU.J CALL_USER parameters are passed to the externacl program exactly as you8 enter them; DECTPU does not process them in any way. Syntax+ string2 := CALL_USER (integer, string1) ParametersG integer The integer passed to the external program by reference.G string1 The string passed to the external program by descriptor.H Note: For an example of how to use CALL_USER with a BASIC program, see/ the DEC Text Processing Utility Manual.wwG3; 1 CHANGE_CASE CHANGE_CASEH Changes dthe case of all alphabetic characters in a buffer, range, or6 string, according to the keyword that you specify.I Optionally, returns a string, range, or buffer containing the changed text. SYNTAX [returned_buffer | returned_range |B returned_string := ] CHANGE_CASE ({buffer | range | string},A {LOWER | UPPER | INVERT},B [IN_PLACE | NOT_IN_PLACE]) PARAMETERSH buffer e The buffer in which you want DECTPU to change theB case. Note that you cannot use the keywordI NOT_IN_PLACE if you specify a buffer for the first! parameter.G range The range in which you want DECTPU to change theB case. Note that you cannot use the keywordH NOT_IN_PLACE if you specify a range for the first! parameter.H strin fg The string in which you want DECTPU to change theC case. If you specify IN_PLACE for the thirdK parameter, CHANGE_CASE makes the specified change toC the string specified in the first parameter.E CHANGE_CASE has no effect on string constants.J LOWER A keyword directing DECTPU to change letters to all! lowercase.J UPPER A keyword dir gecting DECTPU to change letters to all! uppercase.E INVERT A keyword directing DECTPU to change uppercaseE letters to lowercase, and lowercase letters to! uppercase.G IN_PLACE A keyword directing DECTPU to make the indicatedH change in the buffer, range, or string specified.+ This is the default.H NOT_IN_PLACE A keyword directing DECTPU hto leave the specifiedG string unchanged and return a string that is theJ result of the specified change in case. You cannotK use NOT_IN_PLACE if the first parameter is specifiedK as a range or buffer. To use NOT_IN_PLACE, you must> specify a return value for CHANGE_CASE.G returned_buffer A variable of type buffer pointing to the bufferE containing th ie modified text, if you specify aD buffer for the first parameter. The variableJ "returned_buffer" points to the same buffer pointedG to by the buffer variable specified as the first! parameter.K returned_range A range containing the modified text, if you specifyG a range for first parameter. The returned rangeF spans the same text as the range specjified as aK parameter, but they are two separate ranges. If youG subsequently change or delete one of the ranges,= this has no effect on the other range.D returned_string A string containing the modified text, if you@ specify a string for the first parameter. EXAMPLES) 1. CHANGE_CASE (main_buffer, UPPER);H Makes all characters in the main buffer uppercase. If you enterG k this on the command line and if the buffer is associated with aI visible window, you will see the changes take effect immediately.H 2. returned_value := CHANGE_CASE (CURRENT_BUFFER, LOWER, IN_PLACE);K Makes all characters in the current buffer lowercase. The variableB returned_value contains the newly modified current buffer.I 3. returned_value := CHANGE_CASE (the_string, INVERT, NOT_IN_PLACE);F Inverts the case of all characters in the stlring pointed to byE "the_string", and returns the modified string in the variable "returned_value". Related Topic EDIT TRANSLATEwwG3; 1 COMPILE COMPILEJ Converts the statements in a string, range, or buffer into an internalK compiled format; optionally returns a program. If you compile a bufferF containing executable statements, DECTPU returns a program storingB these executable statements. If the buffer contains proceduremE definitions, DECTPU compiles the procedures and lists them in theJ procedure definition table so you can call them later (for example, byD using them in other procedures or by using the EVE command TPU).D To see the compiler messages, use SET (INFORMATIONAL, ON) before compiling. Syntax5 [program := ] COMPILE ({string | range | buffer}) Parameters@ string A string that is a DECTPU procedure or statement.B range A range containing DECTPU pnrocedures or statements.C buffer A buffer containing DECTPU procedures or statements. Examples. 1. user_program := COMPILE (main_buffer);1 Compiles the contents of the main buffer.2 2. godown :== COMPILE ("MOVE_VERTICAL (+1)");K Stores in the variable GODOWN the compiled statement. You can thenK use that variable with the EXECUTE built-in to move the cursor down one line. Related topics EXECUTE SET(INFORMATIONAL)wowG3; 1 CONVERT CONVERTF Given the coordinates of a point in one coordinate system, CONVERTB returns the corresponding coordinates for the point in anotherH coordinate system. The converted coordinates are returned using the1 "to_x_integer" and "to_y_integer" parameters. Syntax2 CONVERT ({DECW_ROOT_WINDOW | SCREEN | window},( {CHARACTERS | COORDINATES},, from_x_integer, from_y_integer,2 {DECW_ROOT_WINDOW | SCREEN p| window},( {CHARACTERS | COORDINATES},( to_x_integer, to_y_integer) ParametersJ DECW_ROOT_WINDOW Specifies the coordinate system being used by theE root window of the screen on which DECTPU is! running.J SCREEN Specifies the coordinate system being used by theC DECwindows window associated with DECTPU's* top-level widget.J window q Specifies the coordinate system being used by the' DECTPU window.H CHARACTERS Specifies a character-cell system for measuringK screen distance. In a character-based system, theJ point in the top row and the left-most column has. the coordinate (1,1).J COORDINATES Specifies a DECwindows-style coordinate system inJ which coordinate un rits correspond to pixels. TheI pixel in the top row and the leftmost column has/ the coordinates (0,0).K from_x_integer and from_y_integer Specify a a point in the coordinateI system and units specified by the= first two parameters.K to_x_integer and to_y_integer Receive the two integers specifyingH a point sin the coordinate systemH and units specified by the fifthG and sixth parameter. The pointC specified by these integersJ corresponds to the point specifiedE by the first four parameters. ExampleH The following procedure converts a point's location from the currentF window's coordinate sytstem (with the origin in the upper left-handH corner of the window) to the DECTPU screen's coordinate system (withK the origin in the upper left-hand corner of the DECTPU screen). If theJ current window is not the top window, CONVERT changes the value of theA y-coordinate to reflect the difference in the DECTPU screen's coordinate system. PROCEDURE user_convert LOCAL source_x, source_y, dest_x, dest_y; source_x := 1; u source_y := 1; dest_x := 0; dest_y := 0;E CONVERT (CURRENT_WINDOW, COORDINATES, source_x, source_y, SCREEN,* COORDINATES, dest_x, dest_y); ENDPROCEDURE;wwW3; 1 COPY_TEXT COPY_TEXTE Copies the text of a string, range, or buffer, putting it before theJ current position in the current buffer. The text is entered according to) the current mode (INSERT or OVERSTRIKE). Syntax7 [range1 := ] COPY_TEXT ({string | range2 | buffer}v) ParametersG range1 A range where the copied text has been placed.3 string A string you want to copy.K range2 A range containing the text you want to copy. The; range is NOT removed or destroyed.G buffer A buffer containing the text you want to copy.@ The buffer is NOT removed or destroyed. CommentsI If the current buffer is in insert mode, the text is winserted before theH current position in the buffer. If the current buffer is in overstrikeK mode, the text replaces existing text starting at the current position and; continuing for the length of the string, range, or buffer., You cannot add a buffer or range to itself.F If the current buffer is mapped to a visible window, COPY_TEXT causesF DECTPU to synchronize the active editing point with the active cursorG position. As a result, DECTPU may insert padding blanks if the cursor pxosition is not on a character. Examples% 1. COPY_TEXT ("Very like a whale");I If the buffer is set to insert mode, this statement inserts the text> string before the current position in the current buffer. 2. COPY_TEXT (ASCII(10));G If the buffer is set to overstrike mode, this statement causes theJ ASCII character for LINE FEED to replace the current character in the current buffer. Related topics+ MOVE_TEXT SET_INSERT SET_OVERSTRIKEwywW3;1 CREATE_ARRAY CREATE_ARRAYI Creates an array. You can add elements indexed by values of any dataD type except pattern, learn, program, and unspecified. To add anK element whose index is not specified by the parameters, simply assign a- value to an element of an existing array. Syntax; array_variable := CREATE_ARRAY [(integer1 [,integer2])] ParametersK integer1 Optionally, the number of integer-indexed elementsC z you want the array to have. You can indexJ elements with integers even if you do not specifyF this parameter. You can also specify integerI indexes that are not within the range created byG integer1 and integer2. However, processing isJ much faster for integer-indexed elements that areK within the range created by integer1 and in {teger2.F integer2 Optionally, the lowest integer value you wantE DECTPU to use as an index in the array. TheI default value is 1. You can specify a value forH integer2 only if you have specified a value for" integer1. ExamplesC The following assignment statement creates an array with 11J integer-indexed elements. The first integer-indexed array elementJ | in the range created by the two parameters is indexed by the valueJ -5; the last integer-indexed array element in the range is indexed by the value 5.0 array_variable := CREATE_ARRAY (11, -5);K 1. The following assignment statement creates a dynamic element in theK array FOO. The element is indexed by the string BAR. The value 10# is assigned to the element. foo{"bar"} := 10wwW3;1 CREATE_BUFFER CREATE_BUFFER}H Creates a new buffer -- a work space for editing text, storing data, and other purposes. Syntax? [buffer :=] CREATE_BUFFER (string1 [, [string2] [, [buffer], [, string3]]]) Parameters9 string1 The name of the buffer you want to create.K string2 Optionally, specifies the input file for the buffer. If youH do not specify an input file, you create an empty buffer.F buffer The buffer you want to use ~as a template for the bufferK being created. The new buffer has the same attributes (suchJ as tabs, margins, etc.) as the template buffer. For a listI of all the attributes inherited by the new buffer, see theF DEC Text Processing Utility Manual's description of the& CREATE_BUFFER built-in.G string3 The name of the journal file to be used with the buffer.H Note that DECTPU does not copy the journal file name fromK the template buffer. Instead, CREATE_BUFFER uses string3 asI the new journal file name. If you do not specify string3,J DECTPU names the journal file using its journal file namingK algorithm. EVE turns on buffer-change journaling by defaultH for each new buffer. However, the CREATE_BUFFER built-inD does not automatically turn on journaling; if you areI layering directly on DECTPU, your application must use SET2 (JOURNALING) to turn journaling on. CommentsF If you want to skip an optional parameter and specify a subsequentE optional parameter, you must use a comma as a placeholder for the skipped parameter. Examples- 1. newb := CREATE_BUFFER ("new_buffer");H Creates a buffer called "NEW_BUFFER" and stores a pointer to the$ buffer in the variable NEWB.5 2. CREATE_BUFFER ("second_buffer", "login.com ");H Creates a buffer named "SECOND_BUFFER" and reads the file called$ "LOGIN.COM" into the buffer.< 3. buf1 := CREATE_BUFFER ("scratch",,,"scratch_jl.jl");G Creates a buffer named "SCRATCH" and directs DECTPU to name theI associated buffer-change journal file "SCRATCH_JL.JL". Note thatC you must use commas as placeholders for the two unspecifiedD optional parameters. Note, too, that by default DECTPU putsB journal files in the d irectory defined by the logical nameJ TPU$JOURNAL. By default, TPU$JOURNAL points to the same directoryJ that SYS$SCRATCH points to. You can reassign TPU$JOURNAL to point! to a different directory.D 4. The following code fragment creates a template buffer calledK "DEFAULTS", changes the end-of-buffer text for the template buffer,H and then creates a user buffer. The user buffer is created withA the same end-of-buffer text that the defaults buffer has.9 defaults_buffer := CREATE_BUFFER ("defaults");C SET (EOB_TEXT, defaults_buffer, "[That's all, folks!]");K user_buffer := CREATE_BUFFER ("User1.txt", "", defaults_buffer); Related topics? CREATE_WINDOW DELETE GET_INFO(BUFFER_VARIABLE)* READ_FILE SET(JOURNALING) SHOWwwW3;1 CREATE_KEY_MAP CREATE_KEY_MAPH Creates and names a key map; optionally returns the name of the key map. created for use with other DECTPU procedures. Syntax) [string2] := CREATE_KEY_MAP (string1) Parameters8 string1 The name of the key map you are creating. ExampleJ The following procedure creates a key map and defines two keys in the keyK map; the name of the key map is stored in the variable MY_KEY_MAP which is1 used as a parameter for the DEFINE_KEY built-in: PROCEDURE init_my_key_map0 my_key_map := CREATE_KEY_MAP ("my_key_map");D DEFINE_KEY ("EXIT", CTRL_Z_KEY, "Exit application", my_key_map);G DEFINE_KEY ("COPY_TEXT ('syzygy')", F20, "Magic Word", my_key_map); ENDPROCEDURE; Related topics5 CREATE_KEY_MAP_LIST DEFINE_KEY REMOVE_KEY_MAPwwg!4;1 CREATE_KEY_MAP_LIST CREATE_KEY_MAP_LISTJ Creates and names a key-map list, and also specifies the initial key mapsK in the key-map list it creates; optionally returns the name of the key-map3 list created for use with other DECTPU procedures. Syntax> [string3] := CREATE_KEY_MAP_LIST (string1, string2 [,...]) Parameters< string1 The name of the key-map list that you create.H string2 The names of the initial key maps within the key-map list you create. ExampleE The following procedure creates two key maps, and groups them into a key-map list:$ PROCEDURE init_help_key_map_list; help_user_keys := CREATE_KEY_MAP ("help_user_keys");6 help_keys := CREATE_KEY_MAP ("help_keys");>  help_key_list := CREATE_KEY_MAP_LIST ("help_key_list",> help_user_keys, help_keys); ENDPROCEDURE; Related topics# CREATE_KEY_MAP REMOVE_KEY_MAPwwg!4;1 CREATE_PROCESS CREATE_PROCESS8 Starts a subprocess and associates a buffer with it. Syntax0 process := CREATE_PROCESS (buffer [,string]) ParametersA buffer The buffer for storing output from the subprocess.? string Optionally, a command to send to the subprocess. Comments Example8 mail_proc := CREATE_PROCESS (second_buffer, "mail");K Creates a subprocess, specifies SECOND_BUFFER as the buffer for storingI the output from the subprocess, and sends the DCL MAIL command as the! first command to be executed. Related topics$ ATTACH SEND SEND_EOF SPAWNwwg!4;1 CREATE_RANGE CREATE_RANGEG Returns a range that includes two delimiters and all the characters B between them, and sets the video attributes for displaying theJ characters when they are visible on the screen. A range delimiter canK be a marker, the beginning or end of a line, or the beginning or end ofK a buffer. The beginning and ending delimiters do not have to be of the same type. Syntax: range := CREATE_RANGE ({marker1 | delimiting_keyword},9 {marker2 | delimiting_keyword}1 [, attribute_keyword])  ParametersJ marker1 The marker marking the point in the buffer where+ the range begins.J marker2 The marker marking the point in the buffer where) the range ends.F delimiting_keyword A keyword indicating the point in the bufferH where you want the range to begin or end. TheJ valid keywords and their meaning are as follows:1 Keyword Meaning1 ------- -------F LINE_BEGIN The beginning of the current@ buffer's current line.@ LINE_END The end of the current@ buffer's current line.A BUFFER_BEGIN Line 1, offset 0 in theB current buffer. This isB the first position where> a character could beA inserted, regardless ofF whether there is a characterE there. This is the same asB the point referred to byH BEGINNING_OF (CURRENT_BUFFER).B BU FFER_END The last position in theB buffer where a characterG could be inserted, regardlessI of whether there is a characterE there. This is the same asB the point referred to byB END_OF (CURRENT_BUFFER).J attribute_keyword The video attribute for the range: BLINK, BOLD,G NONE, REVERSE, or UNDERLINE. If you omit the9 parameter, the default is NONE. CommentsG If a marker defining a range is a free marker, DECTPU creates a newJ bound marker, tied to the character or end-of-line nearest to the freeK marker, to use as the range delimiter. Note that an end-of-line is not? a character, but is a point to which a marker can be bound. ExamplesJ 1. my_range := CREATE_RANGE (first_marker, second_marker, UNDERLINE);> Creates a range starting at FIRST_MARKER and ending atB SECOND_MARKER. If the range is visible on the screen, the( characters in it are underlined.A 2. the_range := CREATE_RANGE (BUFFER_BEGIN, mark2, REVERSE);I Creates a range starting at the first point in the buffer where aJ character can be inserted and ending at the point marked by MARK2.G If the range is visible on the screen, the characters in it are5 highlighted with the reverse video attribute. Related Topics MARK MODIFY_RANGEww6;1 CREATE_WIDGET CREATE_WIDGETE Has two variants. One variant creates a heirarchy of widgets (asK defined in a Resource Manager database) and returns the topmost widget.J The other variant creates and returns a widget using the intrinsics or) a Toolkit low-level creation routine. Syntax7 widget := CREATE_WIDGET (widget_class, widget_name,5 {parent_widget | SCREEN}9 [, program_source [, closure4 [, widget_arguments]]])F Creates the widget instance you specify, using the intrinsics of a' Toolkit low-level creation routine.; widget := CREATE_WIDGET (resource_mngr_identifier_name,8 resource_mngr_hierarchy_id,5 {parent_widget | SCREEN}< [, program_source [, closure]])J Creates and returns a widget instance. This variant creates an entireH hierarchy of widgets (as defined in a Resource Manager database) andK returns the topmost widget. All of the children of the returned widgetI are also created. The topmost widget is not managed. If you specifyH one or more callback arguments in your User Interface Language (UIL)G file, specify either the routine TPU$WIDGET_INTEGER_CALLBACK or the' routine TPU$WIDGET_STRING_CALLBACK. Parameters: widget_class The integer returned byI DEFINE_WIDGET_CLASS that specified theA class of widget to be created.K widget_name A string that is the name to be given to. the widget.I parent_widget The widget that is to be the parent ofI the newly created widget. Specify theH third parameter to CREATE_WIDGET as a? widget if the parent for theJ newly-created widget already exists andF is not DECTPU's main window widget.F SCREEN A keyword indicating that the newlyG created widget is to be the child of? DECTPU's main window widget.D program_source A string, buffer, range, learn orC program specifying the interfaceH callback. This code is executed whenD the widget performs a callback to* DECTPU.I closure The closure value can be any string orI integer value y ou want. DECTPU simplyK passes the value to the application whenD the widget performs a callback to* DECTPU.J widget_arguments A series of pairs of resource names andJ resource values, passed as arrays or as@ string/value pairs. For moreA information on specifying thisG parameter, see the documentation for5 DECwindows DECTPU.K resource_mngr_identifier_name A case-sensitive string that is the nameI assigned to the widget in the UIL file7 defining the widget.K resource_mngr_hierarchy_id The hierarchy identifier returned by theJ built-in SET (UID). This identifier isH  passed to the Resource Manager, whichK uses the identifier to find the resource8 name in the database. CommentsD The case of the widget's name that you specify as a parameter toH CREATE_WIDGET must be the same as the case of a widget's name in theI User Interface Definition (UID) file, if there is an accompanying UID file. ExampleJ The following procedure creates a modal dialog box widget and maps theI widget to the DECTPU screen, if the procedure "user_callback_routine"H is a valid callback routine and if there is an accompanying UIL fileH defining the modal dialog box. To see such a UIL file, refer to the( documentation for DECwindows DECTPU.$ PROCEDURE user_create_dialog_box LOCAL example_widget, example_widget_name,# example_widget_hierarchy;$ example_hierarchy := SET (UID, " mynode$dua0:[smith]example ");G example_widget_name := "EXAMPLE_BOX"; ! The widget EXAMPLE_BOX isF ! defined in the UIL file.2 IF GET_INFO (example_widget, "type") <> WIDGET THEN= example_widget := CREATE_WIDGET (example_widget_name,; example_hierarchy,J SCREEN, "user_callback_routine"); ENDIF;# MANAGE_WIDGET (example_widget); RETURN (TRUE); ENDPROCEDURE;K To see an example of how to use the variant of CREATE_WIDGET that callsE the Toolkit low-level creation routine, see the DECwindows DECTPU documentation. Related Topics1 DELETE LOWER_WIDGET MANAGE_WIDGET MAP= RAISE_WIDGET SET(MAPPED_WHEN_MANAGED) UNMANAGE_WIDGET UNMAPww6;1 CREATE_WINDOW CREATE_WINDOWJ Creates a window -- an area on the screen for displaying data; optionallyH returns a window for use with other DECTPU procedures. You specify theD screen line number at which the window starts and the length of the window. Syntax> [window :=] CREATE_WINDOW (integer1, integer2, {OFF | ON}) ParametersA integer1 The screen line number at which the window starts.0 integer2 The number of rows in the window.: OFF To turn off the status line for the window.9 ON To turn on the status line for the window. Example- new_window := CREATE_WINDOW (11, 10, ON);K Creates a window that starts at screen line number 11 and is 10 rows long,H and assigns it to the variable NEW_WINDOW. A status line is displayed,K appearing as the last row of the window. To make this window visible, youK must associate an existing buffer with it and map the window to the screen with the following statement: MAP (new_window, buffer); Related topics CREATE_BUFFER MAPww6;1 CURRENT_BUFFER CURRENT_BUFFER=  Returns the buffer in which you are currently positioned. Syntax buffer := CURRENT_BUFFER Examples% 1. my_cur_buf := CURRENT_BUFFER;J Stores in the variable MY_CUR_BUF a pointer to the current buffer. 2. SHOW (CURRENT_BUFFER);J Returns the current buffer as the parameter for the SHOW built-in. (See help on SHOW.) Related topics" CREATE_BUFFER CURRENT_WINDOWww6;1 CURRENT_CHARACTER CURRENT_CHARACTERH Returns a string one-character long for the current character in the current buffer. Syntax string := CURRENT_CHARACTER Examples) 1. my_cur_char := CURRENT_CHARACTER;F Stores in the variable MY_CUR_CHAR the string representing the current character.! 2. SHOW (CURRENT_CHARACTER);K Returns the string representing the current character and uses thisK string as the parameter for the SHOW built-in. (See help on SHOW.)ww6;1 CURRENT_COLUMN CURRENT_COLUMNJ Returns an integer identifying the current column of the cursor on theG screen. This does not reflect any movement of the current positionH that has occurred within a procedure in which CURRENT_COLUMN is used4 unless the built-in UPDATE (window) precedes it. Syntax integer := CURRENT_COLUMN Examples% 1. my_cur_col := CURRENT_COLUMN;D Stores in the variable MY_CUR_COL the integer for the column- position of the cursor on the screen.' 2. MESSAGE (STR (CURRENT_COLUMN));D Combines three DECTPU built-ins: CURRENT_COLUMN returns theI integer for the current column position; STR converts the integerJ to a string; and MESSAGE writes this string to the message buffer. Related topics) CURRENT_OFFSET CURRENT_ROW UPDATEww7;1 CURRENT_DIRECTION CURRENT_DIRECTIONE Returns a keyword indicating the current direction of the current( buffer -- either FORWARD or REVERSE. Syntax keyword := CURRENT_DIRECTION Example$ my_cur_dir := CURRENT_DIRECTION;J Stores in the variable MY_CUR_DIR the keyword indicating the direction< set for the current buffer -- either FORWARD or REVERSE.ww7;1 CURRENT_LINE CURRENT_LINEH Returns a string representing the current line. The current line is: the line on which the active editing point is located. Syntax string := CURRENT_LINE CommentsG If the cursor is free and the current buffer is mapped to a visibleE window, using CURRENT_LINE may result in the insertion of paddingA spaces or lines from the nearest text to the cursor position. Example my_cur_line := CURRENT_LINEJ Stores in the variable MY_CUR_LINE the string representing the current line. Related topics CURRENT_OFFSET CURRENT_ROWww7;1 CURRENT_OFFSET CURRENT_OFFSETG Returns an integer for the offset of the current character positionJ within the current line. The leftmost character position is offset 0. Syntax integer := CURRENT_OFFSET Example! my_cur_off := CURRENT_OFFSET;I Stores in the variable MY_CUR_OFF the integer for the offset position of the current character. Related topics CURRENT_COLUMN CURRENT_ROWww7; 1 CURRENT_ROW CURRENT_ROWE Returns an integer that is the screen line on which the cursor isH located. This does not reflect any movement of the current positionE that has occurred within a procedure in which CURRENT_ROW is used4 unless the built-in UPDATE (window) precedes it. Syntax integer := CURRENT_ROW Example my_cur_row := CURRENT_ROW;F Stores in the variable MY_CUR_ROW the integer for the current row. Related topics; CURRENT_COLUMN CURRENT_LINE CURRENT_OFFSET UPDATEww7;1 CURRENT_WINDOW CURRENT_WINDOW6 Returns the window in which the cursor is visible. Syntax window := CURRENT_WINDOW Example! my_cur_win := CURRENT_WINDOW;G Stores in the variable MY_CUR_WIN the window in which the cursor is visible. Related topics CURRENT_BUFFERww7;1 CURSOR_HORIZONTAL CURSOR_HORIZONTALK Moves the cursor position left or right across the screen by the number ofK columns you specify. This may move the cursor off the text in the buffer.- CURSOR_HORIZONTAL allows free cursor motion. Syntax/ [integer2 := ] CURSOR_HORIZONTAL (integer1) ParametersI integer1 The number of columns to move the cursor. Positive valuesB are to the right. Negative values are to the left.H integer2 The number of columns that the cursor actually moved. IfE you specified a value that would have moved the cursorH outside the window, CURSOR_HORIZONTAL moves the cursor asG many columns as possible while keeping the cursor in the window. Example CURSOR_HORIZONTAL (+1);: Moves the cursor position one screen column to the right. Related topics! CURSOR_VERTICAL MOVE_HORZONTALww7;1 CURSOR_VERTICAL CURSOR_VERTICALJ Moves the cursor position up or down on the screen by the number of linesG you specify. The cursor does not move right or left. CURSOR_VERTICAL allows free cursor motion. Syntax, [integer2 :=] CURSOR_VERTICAL (integer1) ParametersG integer1 The number of screen lines to move the cursor. PositiveK values are toward the bottom of the screen. Negative values0 are toward the top of the screen.J integer2 The number of lines that the cursor actually moved. If youG specified a value for integer1 that would put the cursor4 outside the current window and if SETF (CROSS_WINDOW_BOUNDS...) is set to OFF, CURSOR_VERTICALK moves the cursor as many lines as possible while keeping the, cursor in the current window. Example CURSOR_VERTICAL (+5);D Moves the cursor position five lines down (toward the bottom of the screen). Related topics@ CURSOR_HORIZONTAL MOVE_VERTICAL SET(CROSS_WINDOW_BOUNDS)ww7; 1 DEBUG_LINE DEBUG_LINEI Returns the line number of the current break point. This built-in isJ used in user-written debugging programs. If you do not write your ownE debugging program, you can use the debugger provided with DECTPU,' located in SYS$SHARE:TPU$DEBUG.TPU. Syntax integer := DEBUG_LINE Parameters none Related Topics SET(DEBUG)ww7; 1 DEFINE_KEY DEFINE_KEY: Associates executable DECTPU code with a key you specify. Syntax= DEFINE_KEY ({buffer | learn | program | range | string1},- keyword [,string2 [,string3]]) ParametersK buffer A buffer containing the DECTPU statements to be bound to the key.F learn A learn sequence containing the DECTPU statements to be bound to the key.J range A range containing the DECTPU statements to be bound to the key.H program A program containing the DECTPU statements to be bound to the key.K string1 A string specifying the DECTPU statements to be bound to the key.I keyword The key (or key combination) you want to define. See help7 on KEYNAMES TABLE and NONDEFINABLE KEYS.I string2 A comment associated with the key definition, which can be6 retrieved with the LOOKUP_KEY built-in.D string3 The key map or key-map list in which the key is to beH defined. The default is the first key map in the key-map0 list bound to the current buffer. Examples7 1. DEFINE_KEY ("POSITION (main_window)", CTRL_P_KEY);I Defines CTRL/P as the DECTPU statement POSITION (main_window). Note: that you must use quotes around the DECTPU statement.G 2. DEFINE_KEY ("COPY_TEXT ('Sincerely,')", KEY_NAME ("s",SHIFT_KEY));J Defines the combination of the DECTPU shift key (by default, PF1) andI the letter S (upper- or lower-case) to copy the text "Sincere ly," atI the current character location in the current buffer. Note that youH must alternate the quote characters that are used as delimiters forE the first parameter. Also note that you must quote the keyboard> character that you use in combination with the shift key., 3. user_closing := COMPILE ("Sincerely,");9 DEFINE_KEY (user_closing, KEY_NAME ("s",SHIFT_KEY));I Effectively the same as Example 2, but using a variable instead of a quoted string.& 4. DEFINE_KEY (main_buffer, MINUS));C Defines the MINUS key on the keypad to compile the main bufferC (containing DECTPU statements). If there are no errors in theF compilation, DECTPU binds the executable code to that key (or key combination). Related topicsE LOOKUP_KEY KEY_NAME Keynames Table SHIFT_KEY UNDEFINE_KEYww.7;1 DEFINE_WIDGET_CLASS DEFINE_WIDGET_CLASSJ Defines a widget class for later use in creating widgets of that classJ using the Intrinsics or the Toolkit low-level creation routines. EachK call returns a different class integer. You use the integer to specify5 the class of a widget when you create the widget. Syntax5 integer := DEFINE_WIDGET_CLASS (widget_class_name< [, creation_routine_nameE [, creation_routine_image_name]]) ParametersK integer An integer used to iden tify the class ofI widget to be created by CREATE_WIDGET.J widget_class_name A string that is the name of the widgetE class record. This is a universalK symbol exported by the Toolkit or widget* writer.C creation_routine_name A string that is the name of theH low-level widget creation routi ne forF this widget class. The name can be@ either a VMS binding which isI case-insensitive and contains a dollar@ sign, or a C binding which isH case-sensitive and does not contain a/ dollar sign.C creation_routine_image_name A string that is the name of theE shareable image in which the classI record can be found. Only the name ofE the file can be specified; device,G directory, type, and version are notE allowed. If you do not specify anF image, DECTPU assumes the widget is< defined in DECW$XMLIBSHR.ww.7;1 DELETE DELETEI Deletes DECTPU structures from your editing context. All variables thatJ refer to that structure are set to UNSPECIFIED. If the deleted structure. had any associated resources, they are freed. Syntax@ DELETE ({array | buffer | integer | keyword | learn | marker: | pattern | process | program | range | string. | unspecified | widget | window }) ParametersK array The array you want to delete. If the array contains theF only references to another data structure such as aE pattern, then that data structure is also deleted.J buffer The buffer you want to delete. Note that if the bufferE was being journaled, DECTPU closes and deletes the journal file.; integer The integer variable you want to delete.H keyword The variable of type keyword that you want to delete.9 learn The learn sequence you want to delete.1 marker The marker you want to delete.K pattern The pattern you want to delete. If the pattern includesH a reference to another pattern and there are no otherK references to that pattern, then the pattern referred to# is also deleted.2 process The process you want to delete.2 program The program you want to delete.H range The range you want to delete. The text in a range isE owned by the buffer, not by the range. Therefore,I deleting a range does not affect any characters in the buffer.1 string The string you want to delete.J unspecified A variable of type unspecified that you want to delete.> This operation is allowed but does nothing.1 widget The widget you want to delete.1 window The window you want to delete. Example DELETE (main_buffer);K Deletes the main buffer and any associated resources that DECTPU allocatedI for the main buffer. As a result, SHOW (BUFFERS) does not list the main6 buffer as one of the buffers in your editing context. Related topics2 ERASE ERASE_CHARACTER ERASE_LINE UNMANAGE_WIDGET UNMAPww.7;1 EDIT EDITE Modifies a string according to the keywords you specify. This isC similar to the DCL lexical function F$EDIT; the differences are8 explained in the DEC Text Processing Utility Manual.H Optionally, returns a string, range, or buffer containing the edited text. Syntax [returned_buffer | returned_range |; returned_string := ] EDIT ({buffer | range | string},I keyword1[,...] [,keyword2] [,keyword3]) ParametersH buffer The buffer in which you want DECTPU to edit text.K Note that you cannot use the keyword NOT_IN_PLACE ifD you specify a buffer for the first parameter.G range The range in which you want DECTPU to edit text.K Note that you cannot use the keyword NOT_IN_PLACE ifC you specify a range for the first parameter.G string The string you want to modify. If you specify aH return value, the returned string consists of theK string you specify for the first parameter, modifiedJ in the way you specify in the second and subsequentI parameters. If you specify IN_PLACE for the thirdH parameter, EDIT makes the specified change to theI string specified in the first parameter. EDIT has5 no effect on string constants.J keyword1 A keyword specifying the editing operation you wantE to perform on the string. Valid keywords are:? COLLAPSE, COMPRESS, INVERT, LOWER, TRIM,= TRIM_LEADING, TRIM_TRAILING, or UPPER.K keyword2 A keyword specifying whether DECTPU quote charactersG are used as quote characters or as regular text.H The valid keywords are ON or OFF. The default is ON.G keyword3 A keyword indicating where DECTPU i s to make theF indicated change. The valid keywords and their. meaning are as follows:. Keyword Meaning. ------- -------J IN_PLACE Make the indicated change in place.; This is the default.E NOT_IN_PLACE Leave the the specified stringI unchanged and return a string thatE is the result of the specifiedL editing. You cannot use NOT_IN_PLACEM if the first parameter is specified asA a range or buffer. To useE NOT_IN_PLACE, you must specify? a return value for EDIT.G returned_buffer A variable of type buffer p ointing to the bufferE containing the modified text, if you specify aD buffer for the first parameter. The variableJ "returned_buffer" points to the same buffer pointedG to by the buffer variable specified as the first! parameter.K returned_range A range containing the modified text, if you specifyG a range for first parameter. The returned rangeF spans the same text as the range specified as aK parameter, but they are two separate ranges. If youG subsequently change or delete one of the ranges,= this has no effect on the other range.D returned_string A string containing the modified text, if you@ specify a string for the first parameter. ExamplesI 1. returned_value := EDIT (the_string, COLLAPSE, OFF, NOT _IN_PLACE);A Removes all spaces and tabs from the string pointed to byI "the_string" and does not treat quotation marks or apostrophes asF quote characters. Returns the modified string in the variableH "returned_value", but does not change the string in the variable "the_string".I 2. The following procedure shows a general way of changing any inputI string to lower case; the string with the changed case is written to the message area:6 PROCEDURE user_lowercase_string (input_string)& EDIT (input_string, LOWER);" MESSAGE (input_string); ENDPROCEDURE; Related Topics CHANGE_CASE TRANSLATEww.7;1 END_OF END_OFK Returns a marker pointing to the last character position in a buffer or a range. Syntax' marker := END_OF ({buffer | range}) Example$ the_end := END_OF (main_buffer);K Stores in the variable THE_END a pointer to the last character position in the main buffer. Related topics BEGINNING_OF LINE_ENDww.7;1 ERASE ERASE4 Erases the contents of a specified buffer or range. Syntax ERASE ({buffer | range}) Examples 1. ERASE (main_buffer);E Erases the contents of the main buffer. It does NOT destroy theE buffer itself. All markers and ranges will be left on the first character of the EOB text. 2. ERASE (select_range);? Erases the currently selected range in the current buffer. Related topics* DELETE ERASE_CHARACTER ERASE_LINEww.7;1 ERASE_CHARACTER ERASE_CHARACTERI Erases the number of characters you specify; optionally returns a stringG representing the erased characters for use in other DECTPU procedures. Syntax) [string] := ERASE_CHARACTER (integer) ParametersI integer The number of characters you want to remove. To erase the, current character, specify 1. Examples 1. ERASE_CHARACTER (10);D Erases the current character and the 9 characters following it.J 2. The following procedure uses ERASE_CHARACTER to swap or transpose the? current character and the immediately preceding character: PROCEDURE swap_character LOCAL swapchar;F swapchar := ERASE_CHARACTER (1); ! Erase current characterF MOVE_HORIZONTAL (-1); ! Move back one characterF COPY_TEXT (swapchar); ! Put in erased character ENDPROCEDURE; Related topics+ COPY_TEXT DELETE ERASE ERASE_LINEwwU7; 1 ERASE_LINE ERASE_LINEF Erases the current line from the current buffer; optionally returns aH string representing the erased line for use in other DECTPU procedures. Syntax [string] := ERASE_LINE Example take_out_line := ERASE_LINE;I Erases the current line in the current buffer and stores in the variableE TAKE_OUT_LINE the string of characters representing the erased line. Related topics0 COPY_TEXT DELETE ERASE ERASE_CHARACTERwwU7;1 ERROR ERRORI Returns a keyword for the latest error encountered by DECTPU. The valueI returned by ERROR is only meaningful inside an error handler. The value4 returned outside an error handler is indeterminate. Syntax keyword := ERROR Parameters none ExampleD The f ollowing code fragment is an error handler that uses the ERRORJ built-in to determine what error invoked the error handler. If the errorH was that SEARCH could not find the specified string, then the procedureI returns normally. If the error was something else, then the text of theA error message is written to the message buffer and any executing procedures are aborted. ON_ERROR! IF ERROR = TPU$_STRNOTFOUND THEN RETURN; ELSE! MESSAGE (ERROR_TEXT); ABORT; ENDIF; ENDON_ERROR; Related Topics4 ERROR_LINE ERROR_TEXT MESSAGE MESSAGE_TEXTwwU7; 1 ERROR_LINE ERROR_LINEI Returns the line number for the latest error encountered by DECTPU. TheI value returned by ERROR_LINE is only meaningful inside an error handler.8 The value outside of an error handler is indeterminate.F If a procedure was compiled as part of the compilation of a buffer orB range, ERROR_LINE determines the line number by counting from theI beginning of the buffer or range. Therefore, the line number may not beJ the same as the line number counting from the beginning of the procedure.D If the procedure was compiled from a string, ERROR_LINE returns the value 1. Syntax integer := ERROR_LINE Parameters none ExampleH The following code fragment is an error handler that uses ERROR_LINE to! report where the error occurred: ON_ERROR MESSAGE (ERROR_TEXT);4 MESSAGE ("Error on line " + STR (ERROR_LINE)); RETURN; ENDON_ERROR; Related Topics% ERROR ERROR_TEXT MESSAGE_TEXTwwU7; 1 ERROR_TEXT ERROR_TEXTG Returns the text of the latest error message generated by DECTPU. TheI value returned by ERROR_LINE is only meaningful inside an error handler.8 The value outside of an error handler is indeterminate. Syntax string := ERROR_LINE Parameters none ExampleH The following code fragment is an error handler that uses ERROR_TEXT to report what error occurred: ON_ERROR MESSAGE (ERROR_TEXT);3 MESSAGE ("Error on line " + STR (ERROR_LINE); RETURN; ENDON_ERROR; Related Topics% ERROR ERROR_LINE MESSAGE_TEXTwwU7; 1 EXECUTE EXECUTE Does one of the following:; o Executes a program that you have previously compiledJ o Compiles and then executes any executable statements in a specified buffer, range, or string+ o Replays or executes a learn sequenceI o Executes the program, procedure, or learn sequence bound to a key. Syntax0 EXECUTE ({program | buffer | range | string1+ | learn | keyword [,string2]}) Parameters9 program The program you want to execute.G buffer The buffer whose contents you want to execute.B The buffer must contain only valid DE CTPU$ statements.H range The range whose contents you want execute. TheI range must contain only valid DECTPU statements.G string1 The string whose contents you want to execute.B The string must contain only valid DECTPUJ statements. The string cannot be longer than 132$ characters.? learn The learn sequence you wa nt to replay.J keyword The key (or key combination) whose definition youF want to execute. See help on KEYNAMES TABLE.I string2 Optionally, a key map or key-map list in which aI key is defined. If you specify a keyname as theK required parameter for EXECUTE, you may optionallyG specify the key map or key map list from whichG DECTPU sh ould get the key definition. If thisJ parameter is not specified, DECTPU uses the firstJ definition found in the key map list bound to the( current buffer. CommentsE To specify a value to be returned by the EXECUTE statement, use aH RETURN statement as the last statement in the code, string, or learnE sequence passed to EXECUTE. For example, the following statementH assigns to the variable "a" the value of the program returned by the LOOKUP_KEY built-in:8 a := EXECUTE ("RETURN LOOKUP_KEY (ENTER, PROGRAM)");F If you specify the name of an undefined, self-inserting key as theF first parameter, DECTPU inserts the appropriate character into the current buffer. Examples 1. EXECUTE (main_buffer);G Compiles the contents of the main buffer, and then executes anyI executable statements. If there is text in the main buffer otherG than DEC TPU statements, you get an error message. If there areH procedure definitions in the main buffer, they are compiled, butI they are not executed until you run the procedure. Once compiledE by the EXECUTE built-in, procedures in the main buffer can beC called by other DECTPU statements, programs, or procedures.. 2. EXECUTE (RET_KEY, "TPU$KEY_MAP_LIST");H The following statement looks up the program bound to the RETURNG key in the default DECTPU key map list and executes the code or learn sequence found.J 3. The following procedure prompts the user for a DECTPU statement to1 execute, and then executes the statement: PROCEDURE user_doI command_string := READ_LINE ("DECTPU statement to execute: ")$ EXECUTE (command_string); ENDPROCEDURE Related Topics COMPILE RETURNwwU7;1 EXIT EXITA Ends the editing session and writes out any modified buffers.I By default, DECTPU writes out a modified buffer using the output fileH specification associated with the buffer. If there is no associated: output file specification, DECTPU prompts you for one.> Buffers having the NO_WRITE attribute are not written out. Related topics8 QUIT SET(NO_WRITE) SET(OUTPUT_FILE) WRITE_FILEwwU7; 1 EXPAND_NAME EXPAND_NAMEH Returns a string containing the name (or names) of DECTPU variables,I keywords, or procedures that begin with a string you specify. DECTPUI searches its internal symbol tables to find a match, using your input2 string as the initial substring for the match. Syntax- string2 := EXPAND_NAME (string1, keyword) ParametersF string1 The initial substring of a DECTPU name. The string mayF contain the asterisk wildcard (*, matching an arbitraryH number of characters) and percent wildcard (%, matching a+ single arbitrary character).9 keyword The type of DECTPU name you want to match:- ALL .......... Match all names6 KEYWORDS ..... Match only keyword names8 PROCEDURES ... Match only procedure names7 VARIABLES .... Match only variable names Example- full_name := EXPAND_NAME ("create", ALL);A Returns in the variable FULL_NAME the following DECTPU words:, CREATE_BUFFER CREATE_KEY _MAP, CREATE_KEY_MAP_LIST CREATE_PROCESS+ CREATE_RANGE CREATE_WINDOWww|7;1 FAO FAOH Invokes the Formatted ASCII Output (FAO) system service to convert aK control string to a formatted ASCII output (FAO) string. By specifyingK arguments for each FAO directive in the control string, you can controlI the processing performed by the FAO system service. The FAO built-inB returns a string containing the formatted ASCII output string. Syntax+ string2 := FAO (string1 [, FAO-params]) ParametersF string1 The fixed text of the output string and FAO directives.A FAO_params In general, these parameters correspond to the FAOJ directives in string1. A maximum of 127 FAO parameters areI allowed. See the VMS System Services Reference Manual forJ more information on the Formatted ASCII Output (FAO) system service. Examples# 1. da te_time := FAO ("!%D",0);C Stores in the variable DATE_TIME the current date and time.G 2. The following procedure uses the FAO directive !SL in a controlI string to convert the number equated to the variable count into aI string; the converted string is stored in the variable REPORT and, then is written to the message area:" PROCEDURE user_convert_fao count := 57;: report := FAO ("number of forms = !SL", count);  MESSAGE (report); ENDPROCEDURE;ww|7; 1 FILE_PARSE FILE_PARSEK Performs the equivalent of the DCL F$PARSE lexical function -- that is, itI calls the RMS service $PARSE to parse a file specification and to returnK either an expanded file specification or the file specification field that you request.I If you do not provide a complete file specification, FILE_PARSE suppliesH defaults in the return string from fields it finds first in the defaultF file specification or in the related file specification. If an error; occurs during the parse, FILE_PARSE returns a null string. SyntaxF string4 := FILE_PARSE (string1 [,string2 [,string3 [,keyword1[,...+ [,keyword_n]]]]]) Parameters= string1 The file specification to be parsed.6 string2 A default file specification.5 string3 A related file specificationJ keyword A field in the VMS file specification. The validF keywords are: NODE, DEVICE, DIRECTORY, NAME,H TYPE, VERSION, HEAD, or TAIL. HEAD returns theG NODE, DEVICE, and DIRECTORY. TAIL returns theK NAME, TYPE, and VERSION. Use one or more keywordsJ to specify which fields of the file specificationG you want FILE_PARSE to return. You can use asD man y of these keywords as you wish with oneK FILE_PARSE statement as long as you do not specifyI fields that are duplicates of fields returned byE the HEAD or TAIL keywords. For example, youD cannot use HEAD along with NODE, DEVICE, or# DIRECTORY. CommentsI Specify the first three parameters as strings. Logical names and deviceK names must terminate with a colon. I f you omit optional parameters to theK left of a parameter, you must include null strings a place holders for theJ missing parameters. The FILE_PARSE built-in does not check that the fileK exists. It merely parses the file specifications provided and returns the4 requested portions of resulting file specification. Example1 spec := FILE_PARSE ("program.pas", "[user]");E Calls RMS to parse and return a full file specification for the fileI PROGRAM.PAS. The second parameter provides the name of the directory in3 which the file can be found (in this case [USER]). Related Topics FILE_SEARCHww|7; 1 FILE_SEARCH FILE_SEARCHJ Calls the RMS service $SEARCH to search a directory for a file and return+ the partial or full file that you specify.J FILE_SEARCH returns a string containing the resulting file specification.I If you do not provide a complete file specification, FILE_PARSE suppliesH defaults in the return string from fields it finds first in the defaultI file specification or in the related file specification. If the file isJ not found in the directory, FILE_SEARCH returns a null string and signals an error. SyntaxE string4 := FILE_SEARCH (string1 [, string2 [, string3 [, keyword11 [,...[,keyword_n]]]]]) ParametersH string1 The specification of the file you want to find.6 string2 A default file specification.5 string3 A related file specificationJ keyword A field in the VMS file specification. The validF keywords are: NODE, DEVICE, DIRECTORY, NAME,H TYPE, VERSION, HEAD, or TAIL. HEAD returns theG NODE, DEVICE, and DIRECTORY. TAIL returns theK NAME, TYPE, and VERSION. Use one or more keywordsJ to specify which fields of the file specificationG you want FILE_PARSE to return. You can use asD many of these keywords as you wish with oneF FILE_PARSE statement as long as there are notI duplicate requests. For example, you cannot useD HEAD along with NODE, DEVICE, or DIRECTORY. CommentsI Specify the first three parameters as quoted strings. Logical names andK device names must terminate with a colon. If you omit optional paramet ersJ to the left of a parameter, you must include null strings a place holdersJ for the missing parameters. You must use FILE_SEARCH multiple times withD the same parameter to get all of the occurrences of a filename in aF directory. When all matching files have been found, a null string is returned. ExampleI The following procedure puts each .RNO file in the your current, defaultB directory into a separate buffer. You can use the SHOW (BUFFERS)K statement to display the buffers created with this procedure. The initialF FILE_SEARCH clears the context in case of an incomplete previous file search. PROCEDURE user_collect_rnos LOCAL file_spec;& file_spec := FILE_SEARCH (''); LOOP. file_spec := FILE_SEARCH ('*.rno');! EXITIF file_spec = "";K CREATE_BUFFER (FILE_PARSE (file_spec, "", "", name), file_spec); ENDLOOP; ENDPROCEDURE; Related Topics FILE_PARSEww|7;1 FILL FILLH FILL reformats text in the specified buffer or range so the lines ofK text are approximately the same length. To do this, FILL distinguishesA between word characters, which it does not separate, and wordE separators, which it uses as points where lines may be separated. Syntax9 FILL ({buffer | range} [,string [,integer1 [,integer2 [integer3 ] ] ] ]) Parameters@ buffer The buffer whose text you want to fill.? range The range whose text you want to fill.J string A quoted list of word separators you want to use.B A word separator is a character that FILLH recognizes as separating two words. You do notK need to include the space character in the list ofI word separators because the FILL built-in alwaysH treats the space character as a word separator. J integer1 The value for the left margin. The value must beJ at least 1 and must be less than the right marginE value. The default is the value used by the buffer.K integer2 The value for the right margin. The value must beK greater than the left margin and cannot exceed theI maximum record size for the buffer. The default9 is the value used by the buffer.E integer3 The amount by which the first line should beJ indented. This value modifies the left margin ofH the first filled line. Use a negative value toG unindent or create a hanging paragraph. Use aK positive value to create a normally indented line.G You cannot use a value that will make the leftG margin less than one. For example, you cannotJ specify a left margin of 5 and an indent value ofK -5. The value of the indent cannot cause the leftK margin of the first line to be equal to or greater/ than the right margin.0 The default value is 0. CommentsK If you fill a range that does not begin at the beginning of an existingK line, FILL does not change the left margin of that line. If you fill aH range that starts or ends in the middle of a word, FILL may insert a line break in that word.H When FILL moves text up to the previous line, the built-in appends aK space to the end of the previous line if that line ends in a space or aI word character. It does not append a space if the previous line endsI in a word separator other than a space, such as a hyphen. FILL movesK any word separators at t he beginning of a line up to the previous line.D When moving text to a previous line, FILL also moves up any wordJ separators which follow the word, even if the separators extend beyondH the right margin. FILL does not move up a separator if it will makeJ the line exceed the buffer's maximum record size. If moving up a wordK and its separators makes a line end in one or more spaces, FILL deletes one trailing space.K FILL splits lines that are too long. FILL split s the line at the firstJ character of the first word that extends past the right margin, unlessI there is only one word on the line. If this is the case, FILL leaves the word on the line. ExampleE The following statement fills the paragraph assigned to the rangeG variable "paragraph_range". The FILL operation will recognize bothJ spaces and hyphens as word separators. FILL will use a left margin ofF 5, a right margin of 65, and a first line indent of 5. The screen. space will be measured in character cells.5 FILL (paragraph_range, "-", 5, 65, 5, CHARACTERS)ww|7;1 GET_CLIPBOARD GET_CLIPBOARDD Reads STRING format data from the clipboard and returns a string containing this data. Syntax string := GET_CLIPBOARD ParametersK string The data read from the clipboard. Line breaks areH indicated by a linefeed character (ASCII (10)). ExampleH The following statement reads what is currently in the clipboard and, assigns it to the variable "new_string". the_string := GET_CLIPBOARD;wwף7; 1 GET_DEFAULT GET_DEFAULTE Returns the value of an X resource from the X resources database. Syntax- string3 := GET_DEFAULT (string1, string2) ParametersF string1 The name of the resource whose value you want. GET_DEFAULT to fetch.3 string2 The class of the resource.K string3 The string equivalent of the resource value. NoteH that the application must convert the string toK the data type appropriate to the resource, if such1 conversion is necessary. ExampleF If you want to create an extension of EVE that enables use of an XG defaults file to choose a keypad setting, you can use a GET_DEFAULTE statement in a module_init procedure. For more information aboutK extending EVE using a module_init procedure and the EVE$BUILD tool, see+ the DEC Text Processing Utility Manual.B The following code fragment shows the portion of a module_initJ procedure directing DECTPU to fetch the value of a resource from the X resources database.% PROCEDURE application_module_init LOCAL keypad_name; : : :> keypad_name := GET_DEFAULT ("user.keypad", " User.Keypad");J EDIT (keypad_name, UPPER); ! Convert the returned string to uppercase. IF keypad_name <> '0' THEN CASE keypad_name. "EDT" : eve_set_keypad_edt ();0 "NOEDT" : eve_set_keypad_noedt ();. "WPS" : eve_set_keypad_wps ();0 "NOWPS" : eve_set_keypad_nowps ();2 "NUMERIC" : eve_set_keypad_numeric ();0 "VT100" : eve_set_keypad_vt100 ();9 [INRANGE, OUTRANGE] : eve_set_keypad_numeric; ENDCASE; ENDIF; : : : ENDPROCEDURE;wwף7;1 GET_GLOBAL_SELECT GET_GLOBAL_SELECTG Fetches information, to be used by DECTPU or an application layered on0 DECTPU, about the global selection you specify. Syntax {integer | string | array |N UNSPECIFIED} := GET_GLOBAL_SELECT ({PRIMARY | SECONDARY | selection_name},; selection_property) Paramet ersD integer The value of the specified global selectionJ property. The global selection owner returns theI value to DECTPU as an integer if the value is of& type integer.D string The value of the specified global selectionJ property. The global selection owner returns theG value to DECTPU as a string if the value is of% type string.D array An array passing information about a globalK selection whose contents describe information thatH is not of a data type supported by DECTPU. ForJ example, the array could return information about@ a pixmap, an icon, or a span. For moreG information about the contents of the returnedD array, see the documentation for DECwindows DECTPU.D UNSPECIFIED A data type indicating that the informationE requested by the layered application was not# available.J PRIMARY A keyword indicating that the layered applicationJ is requesting information about a property of the2 PRIMARY global selection.J SECONDARY A keyword indicating that t he layered applicationJ is requesting information about a property of the4 SECONDARY global selection.H selection_name A string identifying the global selection whose? property is the subject of the layeredH application's information request. Specify theB selection name as a string if the layeredH application needs information about a selectionC other than the PRIMARY or SECONDARY global# selection.I selection_property A string specifying the property whose value the; layered application wants to know. ExampleB The following statement fetches the text in the primary global? selection and assigns it to the variable "string_to_paste".= string_to_paste := GET_GLOBAL_SELECT (PRIMARY, "STRING");wwף7; 1 GET_INFO GET_INFOI Provides information about the current status of the editor. Use theD first parameter to specify the general area about which you wantK information. Use the second parameter (a DECTPU string) to specify theE exact piece of information you want. Use the third parameter andK subsequent parameters, in the cases where they are required, to provide7 more information required by the GET_INFO built-in. SyntaxE The syntax of GET_INFO depends on the kind of information you areH trying to get. For most uses of GET_INFO, the syntax is as follows:5 return_value := GET_INFO (parameter1, parameter2)H DECTPU requires a third and, occasionally, a fourth parameter if youG are using GET_INFO to get information about the following subjects:? o The name of a key defined in a key map or key map list: o The name of a specified key map in a key map list9 o Whether a procedure is user defined and how many' p arameters the procedure takes= o Which global selection has been grabbed or lost, and/ other information on global selections< o The global selection or input focus grab routine or ungrab routine< o A widget, a widget's resource values, or a widget's callback parameters# o The dimensions of a window8 o The status of a scroll bar or scroll bar sliderK For more information on the use of the third and fourth parameters, seeD the applicable GET_INFO topic. A list of the GET_INFO topics is provided in this topic. ParametersF parameter1 If you want GET_INFO to return information on a givenG variable, use that variable as parameter1. Otherwise,G parameter1 is a keyword specifying the general subjectJ about which GET_INFO is to return information. The valid- keywords for parameter1 are:2 o ARRAY o P ROCESS1 o BUFFER o SCREEN1 o COMMAND_LINE o SYSTEM1 o DEBUG o WINDOW1 o DEFINED_KEY o WIDGETC o KEY_MAP o any of a number of mouseA o KEY_MAP_LIST event keywords such as= o PROCEDURES M1UP, M1DOWN, etc.J parameter2 A DECTPU string constant. This string indicates the kindG of information requested about the item in parameter1.0 How to Get More Detailed HELP on GET_INFO CallsJ DECTPU contains additional HELP covering all the valid GET_INFO calls.H To see all the values of parameter2 (and subsequent parameters) thatJ can be used with a given value of parameter1, invoke the topic for theK appropriate value of parameter1. For example, if you want to know whatF GET_INFO calls are available when parameter1 is a marker variable,/ in voke the topic GET_INFO(MARKER_VARIABLE).D Each GET_INFO topic shows the possible return values for a givenJ combination of parameter1, parameter2, and subsequent parameters. ForI example, the topic GET_INFO(ANY_VARIABLE) shows that when you use anyH variable as parameter1 and the string "type" as parameter2, GET_INFO8 returns a keyword for the data type of the variable.F Note that in some topics parameter1 is a variable, while in others4 parameter1 is a keyword. Fo r example, the topicI GET_INFO(ARRAY_VARIABLE) shows what string constants can be used whenJ parameter1 is an array variable, while the topic GET_INFO(ARRAY) shows: what can be used when parameter1 is the keyword ARRAY.6 The GET_INFO topics in DECTPU HELP are as follows:E Topics Where Topics WhereC Topics Where Parameter1 Parameter1G Parameter1 Is a Specific Is Any Keywor dC Is a Variable Keyword or KeynameH ------------- -------------- ---------------N GET_INFO(ANY_VARIABLE) GET_INFO(ARRAY) GET_INFO(ANY_KEYNAME)N GET_INFO(ARRAY_VARIABLE) GET_INFO(BUFFER) GET_INFO(ANY_KEYWORD)6 GET_INFO(BUFFER_VARIABLE) GET_INFO(COMMAND_LINE)/ GET_INFO(INTEGER_VARIABLE) GET_INFO(DEBUG)5 GET_INFO(MARKER_VARIABLE) GET_INFO(DEFINED_KEY)1 GET_INFO(PROCESS_VARIABLE) GE T_INFO(KEY_MAP)6 GET_INFO(RANGE_VARIABLE) GET_INFO(KEY_MAP_LIST)= GET_INFO(STRING_VARIABLE) GET_INFO(MOUSE_EVENT_KEYWORD)4 GET_INFO(WIDGET_VARIABLE) GET_INFO(PROCEDURES)1 GET_INFO(WINDOW_VARIABLE) GET_INFO(PROCESS)0 GET_INFO(SCREEN)0 GET_INFO(SYSTEM)0 GET_INFO(WIDGET)0 GET_INFO(WINDOW) Examples/ my_buffer := GET_INFO (BUFFERS, "current");I This assignment statement stores the pointer to the current buffer in the variable my_buffer.3 my_string := GET_INFO (my_buffer, "file_name");C This assignment statement stores the name of the input file for( my_buffer in the variable my_string.wwף7;1 GET_INFO(ANY_KEYNAME) GET_INFO(ANY_KEYNAME)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.I The following strings can be used for parameter2 when paramete r1 is a DECTPU keyname:B Parameter 2 | Return Value (Parameter 1 is a key name)J -------------------+------------------------------------------------+H "key_modifiers" | Integer - A bit-encoded integer indicatingK | what key modifier or modifiers haveJ | been used to create the DECTPU keyG | name specified by the parameterG | "key_name". The correspondenceJ | between integers and key modifiers6 | is as follows:? | 1 -- SHIFT_MODIFIED> | 2 -- CTRL_MODIFIED> | 4 -- HELP_MODIFIED= | 8 -- ALT_MODIFIEDG | If the key has been modified byK | more than one modifier, the integerI | returned is the sum of the valuesJ | associated with the modifier. ForI | more information about this call,L | see the documentation for DECwindows/ | DECTPU.D "key_type" | Keyword or - Returns a keyword descri bing@ | 0 the type of key named byA | parameter1. The keywords@ | that can be returned areC | PRINTING, KEYPAD, FUNCTION,@ | CONTROL, SHIFT_PRINTING,E | SHIFT_KEYPAD, SHIFT_FUNCTION,: | and SHIFT_CONTROL.H |  Returns 0 if parameter1 is not a6 | valid keyname.H "unmodified" | Keyword - A keyword for an unmodified key.H | The return value is the key nameF | of the specified key, strippedE | of all key modifiers, such as7 | SHIFT_MODIFIED.J -------------------+--------------------------------- ---------------+ww7;1 GET_INFO(ANY_KEYWORD) GET_INFO(ANY_KEYWORD)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.H The following string can be used for parameter2 when parameter1 is a DECTPU keyword:A Parameter 2 | Return Value (Parameter 1 is a keyword)J -------------------+------------------------------------------------+I "name" | String - Returns the string representationI   | of the keyword used as parameter1J -------------------+------------------------------------------------+ww7;1 GET_INFO(ANY_VARIABLE) GET_INFO(ANY_VARIABLE)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.H The following string can be used for parameter2 when parameter1 is a DECTPU keyname:C Parameter 2 | Return Value (Parameter 1 is a variable)H -------------------+--------------- -------------------------------+9 "type" | Keyword - Data type of itemH -------------------+----------------------------------------------+ww7;1 GET_INFO(ARRAY) GET_INFO(ARRAY)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.K The following strings can be used for parameter2 when parameter1 is the keyword ARRAY:E Parameter 2 | Return Value (Parameter 1 is keyword ARRAY)J --------------- ----+------------------------------------------------+H "current" | Array - The current array in the internal5 | list of arrays. | 0 - If noneF "first" | Array - The first array in the internal5 | list of arrays. | 0 - If noneE "last" | Array - The last array in the internal5 | list of arrays. | 0 - If noneE "next" | Array - The next array in the internal5 | list of arrays. | 0 - If noneI "previous" | Array - The previous array in the internal5 | list of arrays. | 0 - If noneJ -------------------+------------------------------------------------+ww7;1 GET_INFO(ARRAY_VARIABLE) GET_INFO(ARRAY_VARIABLE)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.J The following strings can be used for parameter2 when parameter1 is an array variable:J Parameter 2 | Return Value (Parameter 1 is an array variable)H -------------------+----------------------------------------------+F "low_index" | Array index - Lowest valid integer index for1  | the array/ | UNSPECIFIED - if noneG "high_index" | Array index - Highest valid integer index for1 | the array/ | UNSPECIFIED - if noneF "current" | Array index - Index value of current element? | of the specified array,D | whether the index is of typeB |  integer or some other type/ | UNSPECIFIED - if noneD "first" | Array index - Index value of first element? | of the specified array,D | whether the index is of typeB | integer or some other type/ | UNSPECIFIED - if noneC "next" | Array index - Index value of next element? |  of the specified array,D | whether the index is of typeB | integer or some other type/ | UNSPECIFIED - if noneC "previous" | Array index - Index value of next element@ | of the specified array,E | whether the index is of typeC | integer or some other type0  | UNSPECIFIED - if noneC "last" | Array index - Index value of last element? | of the specified array,D | whether the index is of typeB | integer or some other type/ | UNSPECIFIED - if noneJ -------------------+------------------------------------------------+ww7;1 GET_INFO(BUFFER) GET_INFO(BUFFER)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.K DECTPU orders buffers according to the order in which they are created;5 the first ones created are the first in the list.K The following strings can be used for parameter2 when parameter1 is the keyword BUFFER or BUFFERS:G Parameter 2 | Return Value (Parameter 1 is keyword BUFFERS)J -------------------+------------------------------------------------+3 "current"  | Buffer - Current buffer, | 0 - if noneC "find_buffer" | Buffer - The buffer variable whose nameD | you supply as parameter3. NoteA | that you must supply a thirdG | string parameter naming the bufferA | to be returned if the second@ | parameter is "find_buffer".8  | 0 - if buffer not foundJ "first" | Buffer - First buffer in DECTPU's internal4 | list of buffers, | 0 - if noneJ "last" | Buffer - Last buffer in DECTPU's internal list/ | of buffers, | 0 - if noneJ "next" | Buffer - Next buffer in DECTPU's internal list/ |  of buffers6 | 0 - if at end of listJ "previous" | Buffer - Preceding buffer in DECTPU's internal4 | list of buffers< | 0 - if at beginning of listJ -------------------+------------------------------------------------+ww7;1 GET_INFO(BUFFER_VARIABLE) GET_INFO(BUFFER_VARIABLE)G For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.F T he following strings can be used for parameter2 when parameter1 is a buffer variable:C Parameter 2 | Return Value (Parameter 1 is a buffer variable)L ----------------+----------------------------------------------------------? "before_bol" |(1 or 0) - Returns 1 if the buffer's editingF | point is before the beginning of a line;D | returns 0 otherwise. The return valueE | has no meaning if "beyond_eo b" is true. |E "beyond_eob" |(1 or 0) - Returns 1 if the buffer's editing point> | is beyond the end of the current: | buffer; returns 0 otherwise. |? "beyond_eol" |(1 or 0) - Returns 1 if the buffer's editing@ | point is beyond the end of a line;D | returns 0 otherwise. The return valueE | has no meaning if "beyon d_eob" is true. |? "bound" |(1 or 0) - Returns 1 if the buffer's editingJ | point is at a point occupied by a character,F | space, or line-end; returns 0 otherwise. |J "character" | String - The character at the buffer's editing point. |1 "direction" | Keyword - FORWARD or REVERSE. |I "eob_text" | String - String representing the end-of-buffe r text. |D "erase_ | (1 or 0) - Indicates whether the specified bufferG unmodifiable" | has the ERASE_UNMODIFIABLE setting turnedH | on. For more information on this setting,I | set DECTPU HELP on SET(ERASE_UNMODIFIABLE). |G "file_name" | String - File name associated with the buffer when& | created. |D "first_marker" | Marker - First marker in DECTPU's internal listB | or 0 of markers for the buffer; returns 06 | if there are no markers. |F "first_range" | Range - First range in DECTPU's internal list ofA | or 0 ranges for the buffer; returns 0 if2 | there are no ranges. |B "journal_file" | String - The name of the journal file for theB | or 0 specified buffer, or 0 if the buffer5 | is not being journaled. |@ "journal_name" | String - The default file name DECTPU gives= | to the buffer's journal file if< | journaling is turned on and if; | no other journal file name is( | specified. |H "journaling" | (1 or 0) - Returns 1 if the specified buffer is being5  | journaled, 0 otherwise. |C "key_map_list" | String - The key-map list bound to the buffer. |? "left_margin" | Integer - The buffer's left margin setting. |G "left_margin_ | Program - A program variable containing the programF action" | or invoked when a character is typed to the6 | Learn left of the left margin. |E "line" | String - Line of text a t buffer's editing point. |E "map_count" | Integer - Number of windows mapped to the buffer. |? "max_lines" | Integer - Maximum number of records (lines)4 | allowed in the buffer. |B "middle_of_tab" | (1 or 0) - Returns 1 if the editing point is inG | the middle of a tab; returns 0 otherwise.= | 0 otherwise. The return valueE |  has no meaning if "beyond_eob" is true. |3 "mode" | Keyword - INSERT or OVERSTRIKE. |I "modifiable" | (1 or 0) Indicates whether the buffer is modifiable. |M "modified" | (1 or 0) - Indicates whether the buffer has been modified. | "move_vertical_ |F context" | Integer - An encoded integer specifying the columnB | in which DECTPU attempts to keep theH   | the cursor during MOVE_VERTICAL operationsF | that occur when the COLUMN_MOVE_VERTICALN | setting is turned on. Note that the return valueE | is an encoded value that has meaning to? | DECTPU; it is not a simple columnE | number. Use GET_INFO (buffer_variable,K | "move_vertical_context") to obtain an encode !d> | integer to use as a parameter to: | SET (MOVE_VERTICAL_CONTEXT). |H "name" | String - Name given buffer when created. Uppercase? | on VMS, case sensitive on ULTRIX. |C "next_marker" | Marker - Next marker in DECTPU's internal listB | or 0 of markers for the buffer; returns 06 | if there are no markers. " |E "next_range" | Range - Next range in DECTPU's internal list ofA | or 0 ranges for the buffer; returns 0 if2 | there are no ranges. |H "no_write" | (1 or 0) - Indicates whether the buffer (if modified)C | should be output to a file upon exit. |C "offset" | Integer - Number of character positions between@ | the buffer's e #diting point and theD | first character of the line containingE | the editing point. The first characterC | in the line has an offset of 0. ThisD | GET_INFO call returns 0 if the editingF | point is to the left of the left margin. |B "offset_column" | Integer - Number of screen columns between theF | buffer's edi $ting point and the beginningA | of the line containing the buffer's, | editing point. |I "output_file" | String - Name of explicitly SET output file; returns? | or 0 0 if no output file has been set. |G "permanent" | (1 or 0) - Indicates whether the buffer is permanent6 | or if it can be deleted. |G "read_routine" | Program %The program or learn sequence that DECTPUJ | or executes when it owns a global selection andJ | Learn another DECwindows application has requestedH | or 0 information about that selection. ReturnsH | 0 if no read routine exists. When you useB | this request string, use the keywordC | GLOBAL_SELECT as the third parameter. |< "re &cord_count" | Integer - Number of lines in the buffer. |J "record_mode" | Keyword - Keyword for the record format and attributesJ | for files written from the specified buffer.K | Returns the keyword UNSPECIFIED if the recordH | mode will be taken from the input file (ifL | supported) or from the current system default. |N | ' Keyword Record Format Record AttributesN | ------------------------------------------------> | VARIABLE_NONE fab$c_var 0F | VARIABLE_FTN fab$c_var fab$m_ftnE | VARIABLE_CR fab$c_var fab$m_crE | STREAM fab$c_stm fab$m_crE | STREAM_LF fab$c_stmlf fab$m_crE | ( STREAM_CR fab$c_stmcr fab$m_cr |J "record_number" | Integer - Record number of the buffer's editing point. |E "record_size" | Integer - Maximum length for lines in the buffer. |; "right_margin" | Integer - Current right margin setting. |G "right_margin_ | Program - A program variable containing the programK action" | invoked when a character is typed outside the+ ) | right margin. |G "safe_for_ | (1 or 0) - Returns 1 if it is safe to turn on bufferI journaling" | change journaling for the specified buffer;G | 0 otherwise. A buffer is safe for bufferJ | change journaling if the buffer is empty, orF | has never been modified, or has not beenI | modified since the last time it was written( * | to a file. |N "system" | (1 or 0) - Indicates whether the buffer is a system buffer. |E "tab_stops" | String - Returns a string of the tab stop valuesD | or separated by spaces; or an integer forF | Integer the number of columns between tab stops. |H "unmodifiable_ | (1 or 0) - Returns 1 if the specified buffer containsL records" | one or mor+e unmodifiable records, 0 otherwise.N ----------------+------------------------------------------------------------ww7;1 GET_INFO(COMMAND_LINE) GET_INFO(COMMAND_LINE)G For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.H The following strings can be used for parameter2 when parameter1 is the keyword COMMAND_LINE:F Parameter 2 | Return Value (Parameter 1 is keyword COMMAND_LINE)L -----------------+-------------------------------------------,--------------A "character" | Integer - The column number of the characterE | position specified by /START_POSITION.9 | This call is a synonym forI | GET_INFO(COMMAND_LINE, "start_character").E "character_set" | Keyword - A keyword indicating the character setI | specified by /CHARACTER_SET. The keywordsJ | that can be returned are DEC_MCS (d -efault),7 | GENERAL, and ISO_LATIN1.G "command" | (1 or 0) - Indicates whether /COMMAND was used whenF | invoking DECTPU; returns 1 if defaulted+ | to /COMMAND.< "command_file" | String - File specified with /COMMAND=G "create" | (1 or 0) - Indicates whether /CREATE was used whenF | invoking DECTPU; returns 1 if defaulted* | to /CRE .ATE.G "display" | (1 or 0) - Indicates whether /DISPLAY was used whenF | invoking DECTPU; returns 1 if defaulted+ | to /DISPLAY.J "file_name" | String - File specification used as a parameter when/ | invoking DECTPU.K "first_file_name"| String - First file specification used as a parameter4 | when invoking DECTPU.J | 0 - No file was specifi /ed when invoking DECTPU.K "initialization" | (1 or 0) - Indicates whether /INITIALIZATION is active.H "init_file" | String - File-spec specified with /INITIALIZATION=L | (this is a synonym for "initialization_file") "initialization_ |H file" | String - File-spec specified with /INITIALIZATION=G "journal" | (1 or 0) - Indicates whether /JOURNAL was used whenF | invoking DECTPU; returns 1 if defaulted+ 0 | to /JOURNAL.A "journal_file" | String - File-spec specified with /JOURNAL=F "line" | Integer - The record number of the line specified@ | by /START_POSITION. This call isD | a synonym for GET_INFO (COMMAND_LINE,/ | "start_record").K "modify" | (1 or 0) - Returns 1 if /MODIFY was used on the commandJ | line, 0 if /NOMODIFY was used or 1if neither: | neither qualifier was used.J "next_file_name" | String - Next file specification used as a parameter4 | when invoking DECTPU.M | 0 - If no file was specified when invoking DECTPU,? | or when there are no more files.M "nomodify" | (1 or 0) Returns 1 if /NOMODIFY was used on the commandH | line, 0 if /MODIFY was used or if neither2 2 | qualifier was used.F "output" | (1 or 0) - Indicates whether /OUTPUT was used whenF | invoking DECTPU; returns 1 if defaulted* | to /OUTPUT.< "output_file" | String - File specified with /OUTPUT=.I "read_only" | (1 or 0) - Indicates whether /READ_ONLY was used when4 | when invoking DECTPU.G "recover" | (1 or 0) - Indicates whether /RECOVER was used when/ 3 | invoking DECTPU.G "section" | (1 or 0) - Indicates whether /SECTION was used whenF | invoking DECTPU; returns 1 if defaulted+ | to /SECTION.= "section_file" | String - File specified with /SECTION=.L "start_character"| Integer - Character number specified by /START_POSITION. | (default is 1).I "start_record" | Integer - Record number specified by /START_POSITION. 4 | (default is 1).D "work" | (1 or 0) - Indicates whether /WORK was used whenF | invoking DECTPU; returns 1 if defaulted( | to /WORK.L "work_file" | String - Name of the work file specified at invocationH | time using the /WORK qualifier. If /WORKG | is not specified, the returned string is* | "TPU$WORK".L "writ 5e" | (1 or 0) - Returns 1 if /NOREAD_ONLY, /WRITE, or neitherJ | /WRITE nor /NOWRITE were used when invokingJ | DECTPU; returns 0 if /READ_ONLY or /NOWRITE> | were used when invoking DECTPU.ww7;1 GET_INFO(DEBUG) GET_INFO(DEBUG)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.K The following strings can be used for parameter2 when parameter1 is th 6e keyword DEBUG:J Parameter 2 | Return Value (Parameter 1 is keyword DEBUG)J -------------------+------------------------------------------------+C "breakpoint" | String - Name of the first breakpoint.@ | Returns TPU$_NONAMES if no8 | breakpoint exists.H "examine" | Contents - The value of the variable named byJ | of parameter3. Returns7 TPU$_NONAMES ifJ | variable no breakpoint exists. Note that youH | must specify a third parameter, ofF | type string, naming the variable5 | to be examined.C "line_number" | Integer - The breakpoint's line number,D | counting from the beginning ofF | the procedure. Returns 0 if the8@ | breakpoint does not exist.J "local" | Variable - First local variable in the previousI | procedure; specifies that "next" orF | "previous" will refer to locals;@ | 0 - If no more local variablesE "parameter" | Parameter - First parameter of the previousF | procedure; specifies that "next"B 9 | and "previous" will refer to1 | parameters;A | 0 - If no more local parametersF "next" | Parameter - Next parameter in parameter listE | Variable - Next local variable as declared5 | Breakpoint- Next breakpointB | 0 - End of list has been reachedJ "previous" | Parameter - Previous paramet :er in parameter listI | Variable - Previous local variable as declared5 | Breakpoint- Next breakpointH | 0 - Beginning of list has been reachedJ "procedure" | String - The name of the procedure containing= | the current breakpoint.J -------------------+------------------------------------------------+ww7;1 GET_INFO(DEFINED_KEY) GET_INFO(DE;FINED_KEY)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.G When parameter1 is DEFINED_KEY, the GET_INFO built-in takes a thirdI parameter. The parameter is a string that is the name of the key map# or key map list to be searched.K The following strings can be used for parameter2 when parameter1 is the keyword DEFINED_KEY:K Parameter 2 | Return Value (Parameter 1 is keyword DEFINED_KEY)J -------------------+-----------<-------------------------------------+H "first" | Keyname - First key defined in the specified= | key map or key-map list< | 0 - If no keys are definedG "last" | Keyname - Last key defined in the specified= | key map or key-map list< | 0 - If no keys are definedG "next" | Keyname - Next key defined in the spec =ified= | key map or key-map list< | 0 - If no keys are definedK "previous" | Keyname - Previous key defined in the specified= | key map or key-map list< | 0 - If no keys are definedJ -------------------+------------------------------------------------+H Use string constant "first", before using "next". Use "last" before using "prev>ious".ww7;1 GET_INFO(GLOBAL_SELECT) GET_INFO(GLOBAL_SELECT): Sorry...no help available on GET_INFO (GLOBAL_SELECT)." .I-1;1 GET_INFO(INTEGER_VARIABLE) GET_INFO(INTEGER_VARIABLE)G For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.F The following string can be used for parameter2 when parameter1 is an' integer or a variable of type integer:; Parameter 2 | Return Value (Parameter 1 is an integer)L ----------------+----------------?------------------------------------------H "name" | String - The string representation of the keywordF | associated with the specified integer.? | DECTPU outputs an error messageL | if no string is associated with the integer. |L ----------------+----------------------------------------------------------ww8;1 GET_INFO(KEY_MAP) GET_INFO(KEY_MAP)J @For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.F When parameter1 is KEY_MAP, GET_INFO takes a third parameter. TheI parameter is a string that is the name of the key map list containing the key map you want.K The following strings can be used for parameter2 when parameter1 is the keyword KEY_MAP:G Parameter 2 | Return Value (Parameter 1 is keyword KEY_MAP)J -------------------+------------------------------------------------+GA "first" | String - First key map in the key-map list: | 0 - if no key maps foundF "last" | String - Last key map in the key-map list: | 0 - if no key maps foundF "next" | String - Next key map in the key-map list: | 0 - if no key maps foundJ "previous" | String - Previous key map in the key-map list: | 0 B - if no key maps foundJ -------------------+------------------------------------------------+H Use string constant "first", before using "next". Use "last" before using "previous".ww8;1 GET_INFO(KEY_MAP_LIST) GET_INFO(KEY_MAP_LIST)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.F DECTPU keeps key map lists in the order in which they are created.J The value that is returned when parameter1 is KEY_MAP_LIST is the Cname% of the list, not the list itself.K The following strings can be used for parameter2 when parameter1 is the keyword KEY_MAP_LIST:J Parameter 2 | Return Value (Parameter 1 is keyword KEY_MAP_LIST)J -----------------+--------------------------------------------------+< "current" | String - The current key-map list: "first" | String - The first key-map list9 "last" | String - The last key-map list9 "next" D | String - The next key-map list= "previous" | String - The previous key-map listJ -----------------+--------------------------------------------------+H Use string constants "current" or "first", before using "next". Use1 "current" or "last" before using "previous".ww8;1 GET_INFO(MARKER_VARIABLE) GET_INFO(MARKER_VARIABLE)G For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.F The following strings can be used E for parameter2 when parameter1 is a marker variable:C Parameter 2 | Return Value (Parameter 1 is a marker variable)L ----------------+----------------------------------------------------------E "before_bol" | (1 or 0) - Indicates whether the marker is locatedI | before the beginning of a line. The returnK | value has no meaning if "beyond_eob" is true.E "beyond_eob" | (1 or 0) - Indicates whether the marker is located9F | beyond the end of a buffer.E "beyond_eol" | (1 or 0) - Indicates whether the marker is locatedI | beyond the end of a line. The return valueE | has no meaning if "beyond_eob" is true.F "bound" | (1 or 0) - Indicates whether the marker is attached8 | to a character or is free.D "buffer" | Buffer - Buffer in which the marker is located.C "display_value" | IntegerG - The display value associated with theE | record containing the specified marker.E | For more information on display values,8 | see SET(DISPLAY_VALUE) andC | SET(RECORD_ATTRIBUTE) in DECTPU HELP.E "left_margin" | Integer - Current left margin setting of the line4 | containing the marker.E "middle_of_tab" | (1 or 0) - Indicates whether the marker is loHcatedG | in the middle of a tab. The return valueE | has no meaning if "beyond_eob" is true.M "offset" | Integer - Number of character positions between the firstN | character of the record and the marker location.L "offset_column" | Integer - Number of screen columns between the beginningL | of the current record and the marker location.J "record_number" | Integer - The re Icord number of the line containing the/ | specified marker.F "right_margin" | Integer - Current right margin setting of the line4 | containing the marker.I "unmodifiable_ | (1 or 0) - Returns 1 if the line containing the marker; records" | is unmodifiable, 0 otherwise.I "video" | Keyword - Video attribute of the marker; returns NONEJ | if the marker was created with the parameter* J | FREE_MARKER.J "within_range" | (1 or 0) - Indicates whether the marker is in the rangeL | specified by parameter3. Note that parameter3K | must be a range variable specifying the range- | to be searched.K +---------------+--------------------------------------------------------+ww8;1 GET_INFO(MOUSE_EVENT_KEYWORD) GET_INFO(MOUSE_EVENT_KEYWORD)J For an K overview of the GET_INFO built-in, see the HELP topic GET_INFO.H The following string can be used for parameter2 when parameter1 is aJ DECTPU keyword for the down click of a mouse button (M1DOWN...M5DOWN):G Parameter 2 | Return Value (Parameter 1 is M1DOWN...M5DOWN)J -------------------+------------------------------------------------+G "mouse_event_ | Integer - The number of the specified mouseJ keyword" | button. For example, Lif you specifyJ | the keyword M2DOWN, the call returns4 | the integer 2.L --------------------+--------------------------------------------------+I When parameter1 is a keyword describing a mouse button event, you canJ use GET_INFO to determine the window where the current mouse operationH started. When you use GET_INFO to fetch this information, the valid+ keywords for parameter1 are as follows: M M1UP ... M5UP! M1DOWN ... M5DOWN! M1DRAG ... M5DRAG" M1CLICK ... M5CLICK# M1CLICK2 ... M5CLICK2# M1CLICK3 ... M5CLICK3# M1CLICK4 ... M5CLICK4# M1CLICK5 ... M5CLICK5H The following string can be used for parameter2 when parameter1 is a, DECTPU keyword for a mouse button event:K Parameter 2 | Return Value (Parameter 1 is mouse event keyword)K --------- N----------+-------------------------------------------------+H "window" | Window - The window in which the down-clickG | or occurred that started the currentK | Integer 0 drag operation. If no drag operationF | is in progress for the specified> | mouse button, returns 0.L --------------------+--------------------------------------------------+Oww8;1 GET_INFO(PROCEDURES) GET_INFO(PROCEDURES)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.F When parameter1 is PROCEDURES, the GET_INFO built-in takes a thirdK parameter. The parameter is the name of the procedure whose parameters you want to know about.K The following strings can be used for parameter2 when parameter1 is the keyword PROCEDURES:J Parameter 2 | Return Value (Parameter 1 is keyword P PROCEDURES)J -------------------+------------------------------------------------+D "defined" | (1 or 0) - Indicates whether the specified> | procedure is user-definedJ "minimum_parameters"| Integer - Minimum number of parameters requiredC | for the user-defined procedure= | specified by parameter3. |J "maximum_parameters"| Integer - MaximumQ number of parameters requiredC | for the user-defined procedure= | specified by parameter3.J -------------------+------------------------------------------------+ww8;1 GET_INFO(PROCESS) GET_INFO(PROCESS)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.D DECTPU orders processes according to the order in which they are> created; the first ones created are the fi Rrst in the list.K The following strings can be used for parameter2 when parameter1 is the keyword PROCESS.J Parameter 2 | Return Value (Parameter 1 is keyword PROCESS)J -------------------+------------------------------------------------+J "first" | Process - First process in DECTPU's internal6 | list of processes, | 0 if noneJ "last" | Process - Last process Sin DECTPU's internal6 | list of processes, | 0 if noneJ "next" | Process - Next in DECTPU's internal list of. | processes: | 0 if at end of the listJ "previous" | Process - Preceding process in DECTPU's? | internal list of processes< | 0 if at beginning oTf listJ -------------------+------------------------------------------------+ww8;1 GET_INFO(PROCESS_VARIABLE) GET_INFO(PROCESS_VARIABLE)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.H The following string can be used for parameter2 when parameter1 is a process variable:J Parameter 2 | Return Value (Parameter 1 is a process variable)J -------------------+------------------------------------------------+DU "pid" | Integer - Process identification numberE "buffer" | Buffer - The buffer associated with the. | processJ -------------------+------------------------------------------------+ww8;1 GET_INFO(RANGE_VARIABLE) GET_INFO(RANGE_VARIABLE)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.B For a list of string constants you can use for parameter2 when< parame Vter1 is a range variable, see the following table.H Parameter 2 | Return Value (Parameter 1 is a range variable)L +-------------------+--------------------------------------------------+D "buffer" | Buffer - The buffer in which the range0 | is located.N "unmodifiable_ | (1 or 0) - Returns 1 if the specified range containsF records" | one or more unmodifiable records,1 | W 0 otherwise.B "video" | Keyword - Video attribute of the range.M +-------------------+---------------------------------------------------+ww8;1 GET_INFO(SCREEN) GET_INFO(SCREEN)G For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.H The following strings can be used for parameter2 when parameter1 is the keyword SCREEN:D Parameter 2 | Return Value (Parameter 1 is keyword SCREEN)M -----------------+---------X-------------------------------------------------E "active_area" | Array - An array containing information on theK | or location and dimensions of the application'sF | Integer active area, or 0 if there is no activeC | area. The structure of the array is* | as follows:H | array {1} - Window containing active areaI | array {2} - L Yeftmost column of active areaA | array {3} - Top row of active area? | array {4} - Width of active area@ | array {5} - Height of active area |M "ansi_crt" | (1 or 0) - Indicates whether the terminal is an ANSI_CRT. |K "auto_repeat" | (1 or 0) - Indicates whether auto repeat feature is on. |E "avo" | (1 or 0) - Indicates whether t Zhe terminal has the; | advanced video option (AVO). |D "client_message" | Keyword - Returns the keyword KILL_SELECTION orG | STUFF_SELECTION indicating if DECTPU hasI | received the corresponding client message.F | Returns 0 if there is no current clientK | message. Invalid if called outside a client6 | [ message action routine. |H "client_message | Program - Returns the current client message actionM routine" | or 0 routine. Returns 0 if no such routine is set. |M "cross_window_ | (1 or 0) - Indicates whether the CURSOR_VERTICAL built-inK bounds" | crosses a window boundary when the cursor isJ | moved beyond the top or bottom of a window. |G "current_column" | Intege \r - Returns the column number of the currentJ | column as of the most recent screen update. |L "current_row" | Integer - Returns the screen line number of the currentG | row as of the most recent screen update. |K "dec_crt" | (1 or 0) - Indicates whether the terminal is a DEC_CRT. |L "dec_crt2" | (1 or 0) - Indicates whether the terminal is a DEC_CRT2. ] |L "dec_crt3" | (1 or 0) - Indicates whether the terminal is a DEC_CRT3. |L "dec_crt4" | (1 or 0) - Indicates whether the terminal is a DEC_CRT4. |K "decwindows" | (1 or 0) - Indicates whether the DECwindows environment, | is available. |J "default_file" | String - The name of the X resource file merged intoC | the display's database during editorG ^ | initialization or by SET (DEFAULT_FILE). |K "detached_action"| Program - Returns the current detached action routine.H | or If no such routine is designated, returns4 | Unspeci- the type UNSPECIFIED. | fied |G "detached_reason"| Integer - Returns a bit-encoded integer indicatingI | which of the five possible detached statesD _ | the cursor is in. Digital recommendsJ | that you use DECTPU's predefined constants,H | rather than the actual integers, to referB | to the reasons for detachment. TheE | correspondence of constants, integers,9 | and reasons is as follows: |> | Constant Value Reason> ` | -------- ----- ------E | TPU$K_OFF_LEFT 1 Cursor is offH | the left side ofK | the current window.E | TPU$K_OFF_RIGHT 2 Cursor is offI | the right side ofK | the current window.aG | TPU$K_INVISIBLE 4 Cursor is on anK | invisible record inK | the current window.J | TPU$K_DISJOINT 8 The current bufferL | is not mapped to theG | current window.I | TPU$K_UNMAPPED b 16 No current window? | exists.M | TPU$K_NO_UPDATE 32 Current window cannotC ! be updated. | |G "edit_mode" | (1 or 0) - Indicates whether the terminal is set to) | edit mode. |K "eightbit" | (1 or 0) - Indicates whether the terminal uses eightbitc* | characters. |I "event" | Array - If used in a routine providing informationN | or about a global selection, returns a two-elementM | Keyword array. Array {1} contains a keyword or stringD | or identifying which global selection isF | String the subject of the information request.L | or Array {2} contains a string ndaming the globalB | 0 selection property (such as STRING)E | that is the subject of the information@ | request. If called from within aG | global selection grab or ungrab routine,H | returns the keyword PRIMARY or SECONDARY,F | or a string naming the global selectionA | grabbed or lost. Returns 0 if etheG | call has been used in the wrong context.I | You must specify the keyword GLOBAL_SELECTE | as the third parameter with this call. |M "first_input" | (1 or 0) - Indicates whether or not DECTPU has received aO | key or button event during this editing session. |D "first_input_ | Program - Returns the program or learn sequenceI rfoutine" | or Learn implementing the application's first inputP | or 0 action routine. If no such routine is designated,) | returns 0. |F "global_select" | (1 or 0) - Indicates whether DECTPU currently ownsD | the specified global selection. WhenJ | you use this request string for Parameter2,C | use a third parameter to specify th geD | global selection about which you wantF | information. The values for Parameter3C | are the keyword PRIMARY, the keyword@ | SECONDARY, or a string naming the0 | global selection. |I "grab_routine" | Program - The program or learn sequence implementingD | or the application's global selection orJ h | Learn input focus grab routine. When you use thisI | or 0 request string for Parameter2, use a thirdF | parameter to specify which grab routineG | you want. The values for Parameter3 are? | the keyword GLOBAL_SELECT or theF | keyword INPUT_FOCUS. This call returnsG | 0 if the specified grab routine does not% i | exist. |K "icon_name" | String - The string used as the layered application's? | name in the DECwindows icon box. |@ "input_focus" | 1 or 0 - Indicates whether DECTPU owns the+ | input focus. |J "jump_scroll" | 1 or 0 - Indicates whether the SET (SCROLLING, JUMP)G | statement has been used to direct DECTP jUJ | to use the JUMP mode of scrolling (that is,A | to perform all currently specifiedG | scrolling before repainting the screen). |I "length" | Integer - The current length of the screen (measured( | in rows). |H "line_editing" | Keyword - Current method of line editing (insert orI | or 0 overstrike); 0 if k none. In the DECwindowsJ | version of DECTPU, this call always returns! | 0. |E "motif" | (1 or 0) - Indicates whether the Motif DECwindows8 | environment is available. |G "mouse" | (1 or 0) - Indicates whether DECTPU's mouse support7 | capability is turned on. |F "new_length" | Integer - The numlber of rows that the screen willG | have after the resize action routine hasE | been executed. Resize action routinesF | should use this length, not the currentE | length of the screen, to determine theB | length of windows. If used outsideC | a resize action routine, this lengthG | is the same a ms the current length of theF | screen. This call is not valid in the5 | CCT version of DECTPU. |I "new_width" | Integer - The number of columns that the screen willK | have after the the resize action routine hasE | been executed. Resize action routinesF | should use this length, not the currentE | n length of the screen, to determine theB | length of windows. If used outsideC | a resize action routine, this lengthG | is the same as the current length of theE | screen. This call is not valid in the5 | CCT version of DECTPU. |D "old_length" | Integer - The length of the screen (measured inB | o rows) before the most recent resizeD | event. This call is not valid in the5 | CCT version of DECTPU. |C "old_width" | Integer - The width of the screen (measured inE | columns) before the most recent resizeD | event. This call is not valid in the5 | CCT version of DECTPU. |E "original_ | Integer - p The length (measured in rows) that theB length" | screen had when DECTPU was invoked. |G "original_width" | Integer - The width (measured in columns) that theB | screen had when DECTPU was invoked. |K "pixel_length" | Integer - The length (height) in pixels of the current2 | DECwindows display. |A "pixel_width" | Integer - The width in pixels of the qcurrent2 | DECwindows display. |H "pop_up_parent_ | Widget - The parent widget for Motif popup widgetsG widget" | for use with the CREATE_WIDGET built-in. |B "prompt_length" | Integer - Number of lines in the prompt area. |J "prompt_row" | Integer - Screen line number at which the prompt area& | begins. |H "read_routine" | Progrram The program or learn sequence that DECTPUK | or executes when it owns a global selection andK | Learn another DECwindows application has requestedI | or information about that selection. ReturnsI | 0 0 if no read routine exists. When you useC | this request string, use the keywordD | GLOBAL_SELECT as the third parameter. s |F "screen_limits" | Array - An integer-indexed array specifying theK | minimum and maximum screen length and width.L | This call signals an error in the CCT version) | of DECTPU. |N "screen_update" | (1 or 0) - Indicates whether screen updating is turned on. |K "scroll" | (1 or 0) - Indicates whether the terminal has scrolling' t| regions. |C "time" | String - The amount of time (in delta format)@ | DECTPU will wait after requestingC | information about a global selection? | before assuming that the request4 | will not be answered. |I "ungrab_routine" | Program - The program or learn sequence implementingD | or the aupplication's global selection orL | Learn input focus ungrab routine. When you use thisI | or request string for Parameter2, use a thirdH | 0 parameter to specify which ungrab routineG | you want. The values for Parameter3 are? | the keyword GLOBAL_SELECT or theF | keyword INPUT_FOCUS. This call returnsI | 0 v if the specified ungrab routine does not% | exist. |; "visible_length" | Integer - Page length of the terminal. |H "vk100" | (1 or 0) - Indicates whether the terminal is a GIGI. |M "vt100" | (1 or 0) - Indicates whether the terminal a VT100-series. |M "vt200" | (1 or 0) - Indicates whether the terminal a VT200-series. |M "vt300" w | (1 or 0) - Indicates whether the terminal a VT300-series. |M "vt400" | (1 or 0) - Indicates whether the terminal a VT400-series. |E "widget" | Widget - DECTPU's top level widget in the Motif+ | environment. |D "width" | Integer - Current physical width of the screen. |L "xui" | 0 - Indicates that the XUI DECwindows environment@ x | is no longer supported by DECTPU. |L +----------------+--------------------------------------------------------+ww@8;1 GET_INFO(STRING_VARIABLE) GET_INFO(STRING_VARIABLE)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.I The following strings can be used for parameter2 when parameter1 is a string variable:J Parameter 2 | Return Value (Parameter 1 is a string variable)J -y------------------+------------------------------------------------+G "journal" | Array - Information about the journal fileD | or whose name you specify with theH | 0 string parameter. If the specifiedD | file is not a journal file, theF | integer 0 is returned. The arrayD | indices and the contents of theB z | corresponding elements are as- | follows: |? | Index Contents of Element? | ----- -------------------B | 1 The name of the buffer? | whose contents were6 | journaled. |I { | 2 The date and time the journal= | file was created. |F | 3 The date and time the edit< | session started. |J | 4 The name of the source file. AJ | source file is a file to whichM | | the buffer has been written. TheL | journal file maintains a pointerL | to the source file. This enablesH | the journal file to retrieveK | from the source file the bufferK | contents as they were after theI | last write operation. If theK } | buffer has not been written outJ | or if none of the source filesD | will be available duringK | recovery, this element contains: | a null string. |G | 5 The name of the output fileG | asso~ciated with the buffer. |D | 6 The name of the originalJ | input file associated with theM | buffer. If there is no associatedF | input file or if the inputM | file will not be available duringM | a recovery, this element conta ins: | a null string. |J | 7 DECTPU's identification stringJ | for the version of DECTPU thatC | wrote the journal file. |E | All elements are of type STRING. | |@ "left_margin_ | Program  - The program called when theB action" | or 0 user presses a self_insertingH | key while the cursor is to the leftJ | of the buffer's left margin. ReturnsC | 0 if there is no such program.A "post_key_ | Program - The program called after theD procedure" | or 0 program bound to a key. ReturnsC | 0 if there is no such program.B "pre_key_ | Program - The program called before theE procedure" | or 0 program bound to a key. ReturnsC | 0 if there is no such program.@ "right_margin_ | Program - The program called when theB action" | or 0 user presses a self_insertingI | key while the cursor is to the rightK | of the buffer's right margi n. ReturnsC | 0 if there is no such program.J "self_insert" | (1 or 0) - Indicates if printable characters areF | to be inserted into the buffer if9 | they are not definedG "shift_key" | Keyword - Keyword for the key currently usedD | or 0 as the shift key. Returns 0 if; | there is no shift key.E "undefined_key" | Program - Program called when an undefinedE | or 0 character is entered; 0 if thereC | is no undefined key procedure.J +------------------+------------------------------------------------+ww'g8;1 GET_INFO(SYSTEM) GET_INFO(SYSTEM)G For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.H The following strings can be used for parameter2 when parameter1 is the keywo rd SYSTEM:? Parameter 2 | Return Value (Parameter 1 is keyword SYSTEM)L ----------------+----------------------------------------------------------J "bell" | Keyword - Indicates whether SET(BELL) is on for eitherG | or 0 ALL or BROADCAST. Returns 0 if SET (BELL)% | is OFF. |L "column_move_ | (1 or 0) Returns 0 if the MOVE_VERTICAL built-in is setG vertical" | to preserve the offset from li ne to line;J | returns 1 if it is set to keep the cursor in@ | the same column from line to line. |E "default_ | String - Returns the name of the current default( directory" | directory. |A "display" | (1 or 0) - Indicates whether the input is fromL | a terminal; returns 0 if the DECTPU session is4 | running in batch mod e. |B "enable_resize" | (1 or 0) - Indicates whether screen resizing isC | enabled. By default, screen resizingD | is turned off and this call returns 0. |@ "facility_name" | String - Returns the current facility name. |F "informational" | (1 or 0) - Indicates whether informational messages, | are displayed. |J "journaling_ | Integer - Number indicating how frequently records are: frequency" | written to the journal file. |7 "journal_file" | String - Name of the journal file. |H "line_number" | (1 or 0) - Indicates whether DECTPU displays the line> | number at which an error occurs. |G "message_ | Integer - Completion status severity level at whichK action_level" | DECTPU performs a message action you spe cify.E | Valid values are (in ascending order ofH | severity): 1 (success), 3 (informational),9 | 0 (warning), and 2 (error). |L "message_ | Keyword - Keyword describing the action to be taken whenH action_type" | DECTPU generates a completion status whoseH | severity level is greater than or equal toL | the level set by  SET(MESSAGE_ACTION_LEVEL...).L | Possible keywords are NONE, BELL, and REVERSE. |F "message_flags" | Integer - Current value of message flag setting if9 | changed using SET built-in. |? "operating_ | Keyword - Keyword for the operating system. system" |C | Keyword Operating SystemC | ------------------------------------- > | VMS OpenVMS VAX> | OPEN_VMS_AXP OpenVMS AXP> | ULTRIX RISC/ULTRIX |L "pad_ | (1 or 0) - Indicates whether DECTPU preserves a tab char-J overstruck_ | acter if the user puts text in a tabbed areaE tabs" | while the buffer is in overstrike mode. |G "record_mode" | Keyword - Keyword for the default record format andK | attributes for all files written from buffersJ | having no input file. Initially the defaultC | record mode for the operating system,J | VARIABLE_CR for VMS or STREAM_LF for ULTRIX.K | Can be changed with SET(RECORD_MODE, SYSTEM). |N | Keyword Record Format Record AttributesN | ------------------------------------------------> | VARIABLE_NONE fab$c_var 0F | VARIABLE_FTN fab$c_var fab$m_ftnE | VARIABLE_CR fab$c_var fab$m_crE | STREAM fab$c_stm fab$m_crE | STREAM_LF fab$c_stmlf fab$m_crE | STREAM_CR fab$c_stmcr fab$m_cr  |J "recover" | (1 or 0) - Indicates whether or not DECTPU is currentlyE | performing a recovery using a keystroke+ | journal file. |? "resize_action" | Program - The current resize action routine= | or if one is present, otherwise 0. | Learn | or 0 |M "section_file" | String - Section file name used when DECTPU was inv oked. |J "shift_key" | Keyword - Value of the key set with SET(SHIFT_KEY) for1 | the current buffer. |O "success" | (1 or 0) - Indicates whether success messages are displayed. |O "system_default"| Keyword - Keyword for the operating system's default recordN | format and attributes for all files written fromK | buffers having no input file: VARIAB LE_CR for; | VMS, or STREAM_LF for ULTRIX. |J "timed_message" | String - Text DECTPU displays at one-second intervalsI | in the prompt area if the SET(TIMER) is ON. |H "timer" | (1 or 0) - Indicates whether the built-in SET (TIMER)1 | has been set to ON. |K "traceback" | (1 or 0) - Indicates whether DECTPU displays the callingJ  | sequence for DECTPU procedures when an error% | occurs. |F "update" | Integer - Update number of this version of DECTPU. |B "version" | Integer - Version number of the version DECTPU7 | that is presently in use. |G "work_file" | String - The fully qualified file name of the workC | file opened by DECTPU during startup.J +---------------+-------------------------------------------------------+ww'g8;1 GET_INFO(WIDGET) GET_INFO(WIDGET)G For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.H The following strings can be used for parameter2 when parameter1 is the keyword WIDGET:E Parameter 2 | Return Value (Parameter 1 is the keyword WIDGET)M +----------------+---------------------------------------------------------+J "callback_ | 1 or 0 - The value 1  if the call was encounteredB parameters" | within a callback procedure andH | if callback information is available;> | 0 otherwise. The syntax of? | this built-in is as follows: |I | GET_INFO (WIDGET, callback_parameters,< | array_variable) |B |  The third parameter is an arrayA | created by DECTPU and assignedE | to "array_variable". After DECTPUH | executes the call, the array elementsI | contain the widget instance performingC | the callback, the closure value,F | and the callback reason. The arrayB |  elements are indexed by the the@ | following strings: "widget",D | "closure", "reason_code". If theN | application has used SET (WIDGET_CALL_DATA)H | to define the format of callback dataF | for the widget and reason code thatF | are returned by the current call toL |  GET_INFO (WIDGET, "callback_parameters"),I | then the array parameter automaticallyJ | receives a fourth element. The elementI | is indexed with the string "call_data"I | and contains an integer-indexed array.J | The number of elements in this array isJ | the same as the number of callback dataD  | structure fields specified in theM | corresponding SET (WIDGET_CALL_DATA) call.E | Element 1 contains the event fieldE | (for whcih the application usuallyC | specifies an output data type ofD | UNSPECIFIED); subsequent elementsB | hold the contents of subsequentB  | callback data structure fields. |K "children" | Integer - The number of widget children controlledI | by the specified widget or by DECTPU's6 | main window widget. |C | The syntax of this GET_INFO call1 | is as follows: |@ | GET_INFO (WID GET, "children",? | {SCREEN | widget},< | array_variable) |J | To specify DECTPU's main window widget,E | use the keyword SCREEN; otherwise,G | specify the widget you want. If theJ | widget has any children, DECTPU createsG | an ar ray and assigns it to the arrayJ | variable. The array is integer-indexed;E | its elements contain the children.E | If the widget has no children, theF | array variable is assigned the type/ | UNSPECIFIED. |J "menu_position" | Array - Returns an integer-indexed array of allG | or  pop-up widgets that are set for menuK | NONE positioning; returns the keyword NONE if0 | none are set. |C | The syntax of this GET_INFO call1 | is as follows: |E | GET_INFO (WIDGET, "menu_position",? | mouse_down_button) |G "widget_id" | Widget - The widget instance corresponding toF | the widget name that you pass in asI | the fourth parameter. The widget_nameK | parameter can start with the name of theJ | root widget (for XUI compatibility), orK | or it can start with the name of a childB | of the root widget in the M otifK | environment. The syntax of this call is. | as follows: |A | GET_INFO (WIDGET, "widget_id",F | {parent_widget | SCREEN},9 | widget_name) |K "widget_ | Array - An array indexed by strings that are theH resource_types" | supported widget resource data types:H | "boolean", "callback", "char",< | "compound_string",I | "compound_string_table", "int",D | "short", "unsigned_short",9 | "unsigned_char"G | Each array element is another array,I | integer-indexed from 0, containin g theH | names of widget resources or resourceM | types that are of the specified data type.J | For example, the returned array elementH | whose index is "int" is another arrayK | whose elements are "Int" and "Cardinal". |E | This built-in is valid only in the5 |  Motif environment. |I | The syntax of this call is as follows: |M | GET_INFO (WIDGET, "widget_resource_types") |N +----------------+----------------------------------------------------------+ww78;1 GET_INFO(WIDGET_VARIABLE) GET_INFO(WIDGET_VARIABLE)G For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.F The fol lowing strings can be used for parameter2 when parameter1 is a variable of type widget:L Parameter 2 | Return Value (Parameter 1 is a variable of type widget)M -----------------+----------------------------------------------------------@ "callback_ | Program - The program or learn sequenceD routine" | or that is called when the specified5 | Learn widget calls back. |A "class" | String - The n ame of the class to which@ | the specified widget belongs. |D "input_focus" | (1 or 0) - Returns 1 (TRUE) if the specifiedD | widget currently has input focus;7 | returns 0 otherwise. |I "insertion_ | integer - Returns location of insertion positionF position" | if the widget is a text widget. TheA |  Insertion positions is betweenI | characters. Values start at 0 which isH | the position to the left of the first- | character. |D "is_managed" | (1 or 0) - Returns 1 (TRUE) if the specifiedB | widget is managed, 0 otherwise.E | This built-in calls the DECwindows> |  Toolkit routine XtIsManaged |C "is_subclass" | (1 or 0) - The syntax of this GET_INFO call1 | is as follows: |L | GET_INFO (widget, "is_subclass", integer) |G | The integer parameter is the integerC | returned by DEFINE_WIDGET_CLASS. |M | The call returns 1 (TRUE) if the specifiedG | widget belongs to the class referredI | to by the specified integer or belongsG | to a subclass of that class. A TRUEG | value indicates only that the widgetF | is equal to or is a subclass of theF | specified class; the value does notB |  indicate how far down the classK | hierarchy the widget's class or subclass& | is. |M "name" | String - The name of the specified widget instance. |E "parent" | Widget - The parent of the specified widgetJ | or 0 instance. If the widget has no parent,@ | this GET_INFO call returns 0.  |G "resources" | Array - A string-indexed array in which eachI | index is a valid resource name for theG | specified widget. The correspondingG | array element is a string containingF | the resource's data type and class,I | separated by a line feed (ASCII (10)). |D "text" | St ring - The text in a simple text widget. |F "widget_info" | Array - Values for various resources of the4 | or specified widget. | Pairs ofJ | arguments The syntax for this call is as follows: |L | GET_INFO (widget_variable, "widget_info",G | {array | resource_and_valueN |  [,array | resource_and_value...]}) |I | The values are returned using elementsJ | of the array or arrays, or the variableG | or variables containing the resourceI | values, or a mixture of array elementsH | and variables. If there are no valuesE | to return, DECTPU assigns an empty@ | array to the third parameter. |E | This GET_INFO call is functionallyG | equivalent to the DECwindows Toolkit6 | GET VALUES routine.M +----------------+---------------------------------------------------------+ww78;1 GET_INFO(WINDOW) GET_INFO(WINDOW)J For an overview of the GET_INFO built-in, see th e HELP topic GET_INFO.H DECTPU orders windows according to their "original top" line number.H If multiple windows have the same top line number, the most recently; created window comes first in DECTPU's list of windows.K The following strings can be used for parameter2 when parameter1 is the keyword WINDOW:J Parameter 2 | Return Value (Parameter 1 is keyword WINDOWS)J -------------------+------------------------------------------------+B "curre nt" | Window - Current window on the screen;, | 0 if noneJ "first" | Window - First window in DECTPU's internal4 | list of windows, | 0 if noneJ "last" | Window - Last window in DECTPU's internal list/ | of windows, | 0 if noneJ "next" | Window - Next window in DECTPU's internal list/ | of windows? | 0 if pointing at last windowJ "previous" | Window - Preceding window in DECTPU's internal4 | list of windows@ | 0 if pointing at first windowJ -------------------+------------------------------------------------+ww78;1 GET_INFO(WINDOW_VARIABLE) GET_INFO(WINDOW_VARIABLE)G For an over view of the GET_INFO built-in, see the HELP topic GET_INFO.F The following strings can be used for parameter2 when parameter1 is a window variable:A Parameter 2 | Return Value (Parameter 1 is a window variable)L ---------------+-----------------------------------------------------------F "before_bol" | (1 or 0) - Returns 1 if cursor is to the left of theI | the current line's left margin; otherwise 0.I | The return value has no me aning if "beyond_* | eob" is true.J "beyond_eob" | (1 or 0) Indicates whether the cursor is located afterA | after the end of the current buffer.K "beyond_eol" | (1 or 0) - Indicates whether the cursor is beyond the endJ | of the current line. The return value has noD | has no meaning if "beyond_eob" is true.H "blink_status" | (1 or 0) - Indicates whether BLINK is one of the video: | attributes of the status lineH "blink_video" | (1 or 0) - Indicates whether BLINK is one of the video5 | attributes of the windowH "bold_status" | (1 or 0) - Indicates whether BOLD is one of the video: | attributes of the status lineG "bold_video" | (1 or 0) - Indicates whether BOLD is one of the video5 | attributes of the windowJ "bottom" | Integer - The number of rows or t he last visible row ofK | the specified window or the specified window'sG | text area. The third parameter can be anyF | of the following keywords: WINDOW, TEXT,: | VISIBLE_WINDOW, VISIBLE_TEXT.I "bound" | (1 or 0) - Indicates whether the cursor is located on a& | character> "buffer" | Buffer - The buffer associated with window$ | 0 - if noneF "current_row" | Integer - Row in which the cursor was most recently$ | locatedH "current | Integer - Column in which the cursor was mot recently$ column" | locatedJ "key_map_list" | string - The string naming the key map list associated7 | with the specified window.J "left" | Integer - The number of the leftmost column or leftmostJ | visible column of the specified window or theP | window's text area. The third parameter can be anyF | of the following keywords: WINDOW, TEXT,: | VISIBLE_WINDOW, VISIBLE_TEXT.P "length" | Integer - The number of rows or visible rows in the specifiedH | window or the specified window's text area.; | The third parameter can be anyF | of the following keywords: WINDOW, TEXT,: | VISIBLE_WINDOW, VISIBLE_TEXT.J "middle_of_ | (1 or 0) - Indicates whether the cursor is in the middleK tab" | of a tab. Returns 1 if insert a space will notI | cause white space to be added to the line; 0K | otherwise. The return value has no meaning if1 | "beyond_eob" is trueB "next" | Window - Next window in DECTPU's internal list $ | 0 if lastI "no_video" | (1 or 0) - Indicates whether the video attribute of theI "no_video_ | (1 or 0) - Indicates whether the video attribute of the9 status" | window's status line is NONE+ | window is NONEK "original | Integer - Screen line number of the bottom of the windowJ | when it was created (NOT including the status" | line)I "original_ | Integer - Number of lines in the window (including the) length" | status line)H "original_ | Integer - Screen line number of the top of the window0 top" | when it was createdI "pad" | (1 or 0) - Indicates whether the window is blank-padded) | at the rightF "previous" | Window - Previous window in DECTPU's internal list% | 0 - if firstJ "reverse_ | (1 or 0) - Indicates whether REVERSE is one of the video: status" | attributes of the status lineF "right" | Integer - The number of the last column or the lastC | visible column of the specified windowO | or the window's text area. The third parameter canM | be any of the following keywords: WINDOW, TEXT,: | VISIBLE_WINDOW, VISIBLE_TEXT.H "screen_update"| (1 or 0) - Indicates whether the win dow may be updatedK "scroll" | (1 or 0) - Indicates whether scrolling is enabled for the# | window6 "scroll_amount"| Integer - Number of lines to scrollJ "scroll_bar" | Widget - The specified scroll bar widget if it exists,G | or 0 0 if the widget does not exist. The thirdE | parameter can be either of the following? | keywords: HORIZONTAL or VERTICAL.F "scroll_bar_ | (1 or 0) - Indicates whether automatic adjustment ofH auto_thumb | the scroll bar slider is enabled. The thirdE | parameter can be either of the following? | keywords: HORIZONTAL or VERTICAL.L "scroll | Integer - Bottom of the scrolling area; this is an offset8 bottom" | from the bottom screen lineI "scroll_top" | Integer - Top of the scrolling area; this is an offset5 | from th e top screen lineK "shift_amount" | Integer - Number of columns the window is shifted to the/ | right or the left.J "special_ | (1 or 0) - Indicates whether SPECIAL_GRAPHICS is a videoH graphics_ | video attribute of the window's status line0 "status_line" | String - Text of status line$ | 0 - if noneM "status_video" | Keyword - If there is no video or only one video attributeJ | for the window's status line, the appropriateJ | video keyword is returned (NONE, BLINK, BOLD,E | REVERSE, UNDERLINE, or SPECIAL_GRAPHICS)C | 1 - if there are multiple video attributes7 | 0 - if there is no status lineL "text" | Keyword - Indicates the keyword used with SET(TEXT...) toL | control text display in a window. The keywordsJ | can be re turned are BLANK_TABS, GRAPHIC_TABS,, | or NO_TRANSLATEI "top" | Integer - The number of the first row or first visibleH | row of the specified window or the window'sF | text area. The third parameter can be anyF | of the following keywords: WINDOW, TEXT,: | VISIBLE_WINDOW, VISIBLE_TEXT.? "visible" | (1 or 0) - Indicates whether window is mapped>  | to the screen and is not occludedI "visible_top" | Integer - Screen line number of the visible top of the# | windowL "visible_ | Integer - Screen line number of the visible bottom of theC bottom" | window (NOT including the status line)H "visible_ | Integer - Visible length of the window (including the) length | status line)L "underline_ | (1 or 0) - Indicates whether UNDERLINE is one of the video: status" | attributes of the status lineL "underline_ | (1 or 0) - Indicates whether UNDERLINE is one of the video5 video" | attributes of the windowC "video" | Keyword - If there is no video or only one videoL | attribute for the window, the single video key-J | word is returned (NONE, BLINK, BOLD, REVERSE,* | or UNDERLINE)C | 0 - if there are multiple video attributes0 "width" | Integer - Width of the windowL ---------------+-----------------------------------------------------------wwG8; 1 HELP_TEXT HELP_TEXTI Invokes the VMS HELP utility. You specify the help library that will beI used for help information, the initial library topic, the prompting modeG for the HELP utility, and the buffer for writing the help information. Syntax1 HELP_TEXT (string1, string2, keyword, buffer) ParametersF string1 The name of the help library to use. Put the string inH quotes. If you specify only a filename, the HELP utilityD looks for a file in SYS$HELP with the file type .HLB.) string2 The initial library topic.I keyword Specifies whether the prompting mode for the library is ON or OFF.6 buffer The buffer for writing the information. ExampleD HELP_TEXT ("tpuhelp", (READ_LINE("Topic: ")), OFF, help_buffer)J Prompts the user to type a help topic. The HELP utility uses the libraryE called SYS$HELP:TPUHELP.HLB. The information is written to the help buffer.wwG8;1 INDEX INDEXF Locates a character or a substring within a string and returns its location within the string. Syntax' integer := INDEX (string1, string2) ParametersH string1 The string within which you want to find a character or a4 substring. Put the string in quotes.K string2 The character or substring whose leftmost character locationJ you want to find within string1. Put the string in quotes. Example" loc := INDEX ("1234567", "67")I Stores an integer value of 6 in the variable LOC, since the substringK 67 is found starting at character position 6 within the string 1234567.wwG8;1 INT INTJ Converts a string that consists of numeric characters into an integer,. if you specify a string for the parameter.J Converts a keyword into its DECTPU internal integer equivalent, if you( specify a keyword for the parameter.I Accepts an integer parameter without generating an error; returns the integer you specified. Syntax1 integer := INT ({string | keyword | integer}) ParametersJ string A quoted string, or an expression evaluating to aI quoted string, consisting of numeric characters.H keyword A keyword whose integer equivalent you want the0 INT built-in to return.I integer Any integer. INT supports this parameter solelyI to prevent DECTPU from signaling an error if youD inadvertently specify an integer parameter. Comments: This built-in returns 0 if the string is not a number.B The functionality of converting keywords to integers maintainsJ compatibility with versions of DECTPU that did not support keywords as a separate data type. ExamplesJ The following assignment statement converts the string "12345" into an9 integer value and stores it in the variable user_int. user_int := INT ('12345')wwG8;1 JOURNAL_CLOSE JOURNAL_CLOSEJ Closes an open journal file (if one exists for your session) and saves the journal file. ExampleE The following statements open a file called TEST.JOU in your yourK current, default directory, as the journal file for the editing session and then close it later: JOURNAL_OPEN ("test.jou"); . . . JOURNAL_CLOSE; Related topics# JOURNAL_OPEN SET(JOURNALING)wwG8;1 JOURNAL_OPEN JOURNAL_OPENK Opens a journal file and starts recording the keystrokes of the editingE session. The journal file remains open until you end the editingI session or use JOURNAL_CLOSE. You use a journal file to recover yourG edits in case an editing session is interrupted by a system failureD (such as a break in communications between your terminal and theK computer). For more information, see DCL HELP on EDIT/TPU /JOURNAL and /RECOVER. Syntax' [string2 :=] JOURNAL_OPEN (string1) ParametersH string1 The file specification for the journal file to be createdK for the editing session. If you do not specify a device (orE disk) and directory, DECTPU uses the current (default)D device and directory. The default file type is .TJL. Example JOURNAL_OPEN ("test.jou");I Opens a file called TEST.JOU in your your current, default directory,0 as the journal file for the editing session. Related topics$ JOURNAL_CLOSE SET(JOURNALING)wwG8; 1 KEY_NAME KEY_NAME@ Returns a DECTPU keyword for a key or a combination of keys. Syntax? keyword_variable := KEY_NAME ({string | keyword1 | integer}P [, SHIFT_KEY |, SHIFT_MODIFIED |, ALT_MODIFIEDL |, CTRL_MODIFIED |, HELP_MODIFIED [, ...]]9 [, FUNCTION |, KEYPAD]) ParametersD string A single-character string, or an expressionA evaluating to a single-character string,J representin g the character for which a keyword isI to be generated. The character must be a member@ of the DEC Multinational Character Set.4 keyword1 A DECTPU keyname for a key.G integer The integer value of the character for which aK keyword is to be generated. The character must beI a member of the DEC Multinational Character Set.I The integer can be the integer representation ofH the DECTPU keyword that names the key. You canI obtain this integer representation using the INTI built-in. Alternatively, the integer can be theK DEC Multinational Character Set decimal equivalentF of the character for which a keyword is to beA generated. You can specify this decimalK  equivalent when you want to generate a keyword forJ a key that does not generate a printing characterK and for which there is no existing DECTPU keyname.J SHIFT_KEY A keyword indicating that the returned keyword isG preceded by one or more shift keys. SHIFT_KEYI refers to the DECTPU shift key (PF1 by default),; not the SHIFT key on the keyboard.J SH IFT_MODIFIED A keyword specifying that the key name created byJ the built-in includes the key marked SHIFT on theI keyboard. (The keyword SHIFT_MODIFIED specifiesC the key that toggles between uppercase andJ lowercase.) SHIFT_MODIFIED only modifies function. keys and keypad keys.J ALT_MODIFIED A keyword specifying that the key name created byI  the built-in includes the ALT key. Note that onF most DIGITAL keyboards the ALT key is labeledG COMPOSE CHARACTER. ALT_MODIFIED only modifies7 function keys and keypad keys.J CTRL_MODIFIED A keyword specifying that the key name created byK the built-in includes the CTRL key. CTRL_MODIFIEDE only modifies function keys and keypad keys.J HELP _MODIFIED A keyword specifying that the key name created byK the built-in includes the HELP key. HELP_MODIFIEDE only modifies function keys and keypad keys.K FUNCTION A keyword indicating that the resulting keyname is, a function keyname.K KEYPAD A keyword indicating that the resulting keyname is* a keypad keyname. CommentsK Use KEY_NAME with the DEFINE_KEY built-in to create a keyname for a keyI or sequence of keys. For a list of existing DECTPU keynames, see the5 DECTPU HELP informational topic 'Keynames Table.'C If you do not specify the keyword SHIFT_KEY as a parameter, theK KEY_NAME built-in is case sensitive. That is, the following statements$ generate two different keywords: KEY_NAME ('Z'); KEY_NAME ('z');I If you use the SHIFT_KEY parameter, the built-in is case insensitive. Examples key1 := KEY_NAME ('Z')K This assignment statement creates the keyname key1 for the keyboard key Z.% key2 := KEY_NAME (KP5, SHIFT_KEY)G This example uses KEY_NAME to create a keyname for a combination of keys.! key3 := KEY_NAME (ASCII (10))H This assignment statement creates the keyname key3 for the line feed control character.7 new_key := KEY_NAME (KP4, CTRL_MODIFIED, SHIFT_KEY)A This assignment statement creates a name for the key sequence GOLD/CTRL/KP4. Related Topics' DEFINE_KEY INT SET(SHIFT_KEY)wwW8; 1 LAST_KEY LAST_KEYH Returns a DECTPU keyword for the last key you entered or that DECTPUF read or executed. If you are replaying a LEARN sequence, LAST_KEYB returns a keyword for the key that defines the LEARN sequence. Syntax keyword := LAST_KEY Examples 1. endk := LAST_KEY;; Stores in the variable ENDK the last key you typed.B 2. The following procedure prompts the user for input for key definitions:! PROCEDURE user_define_key7 udef := READ_LINE ("Type the definition: ");> ukey := READ_LINE ("Press the key to define: ", 1); IF LENGTH (ukey) > 0* THEN ukey := KEY_NAME (ukey)$ ELSE ukey := LAST_KEY; ENDIF;# DEFINE_KEY (udef, ukey); ENDPROCEDURE; Related topicsB DEFINE_KEY LOOKUP_KEY KEY_NAME KEYNAMES TABLE READ_KEYwwW8; 1 LEARN_ABORT LEARN_ABORT3 Causes a learn sequence being replayed to stop. Syntax [integer] := LEARN_ABORT Parameters None CommentsH The integer returned indicates whether a learn sequence was aborted.D The built-in returns 1 if a learn sequence was being replayed, 0 otherwise. ExampleK In the following error handler, if an error occurs, any executing learn sequences are aborted. ON_ERROR7 MESSAGE ("Aborting command because of error."); LEARN_ABORT; ABORT; ENDON_ERROR; Related Topics ABORTwwW8; 1 LEARN_BEGIN LEARN_BEGIN and LEARN_ENDB These built-ins save all keystrokes typed between LEARN_BEGIN andJ LEARN_END. LEARN_BEGIN starts saving all keystrokes that you type, untilC LEARN_END is used. LEARN_END stops the "learn mode" and returns a4 sequence comprising all the keystrokes you entered. Syntax# LEARN_BEGIN ({EXACT | NOEXACT}) . . [your keystrokes] . . learn := LEARN_END; ParametersI EXACT Specifies that input entered for each READ_CHAR, READ_KEY,I or READ_LINE is read as the input for these built-ins when. the learn sequence is replayed.J NOEXACT Specifies that DECTPU should prompt for new input each timeI a READ_CHAR, READ_KEY, or READ_LINE is replayed within the learn sequence.B For more information, see the DEC Text Processing Utility Manual.wwW8; 1 LEARN_END LEARN_BEGIN and LEARN_ENDB These built-ins save all keystrokes typed between LEARN_BEGIN andJ LEARN_END. LEARN_BEGIN starts saving all keystrokes that you type, untilC LEARN_END is used. LEARN_END stops the "learn mode" and returns a4 sequence comprising all the keystrokes you entered. Syntax# LEARN_BEGIN ({EXACT | NOEXACT}) . . [your keystrokes] . . learn := LEARN_END; ParametersI EXACT Specifies that input entered for each READ_CHAR, READ_KEY,I or READ_LINE is read as the input for these built-ins when. the learn sequence is replayed.J NOEXACT Specifies that DECTPU should prompt for new input each timeI a READ_CHAR, READ_KEY, or READ_LINE is replayed within the learn sequence.B For more information, see the DEC Text Processing Utility Manual.wwW8;1 LENGTH LENGTHF Returns an integer for the number of characters in a buffer, range orI string. Note that the length of a buffer or range does not include line ends. Syntax1 integer := LENGTH ({buffer | range | string}) Parameters= buffer The buffer whose length you want to determine.: range A range whose length you want to determine.; string A string whose length you want to determine. Example, str_len := LENGTH ("Sir John Falstaff");K Stores in the variable STR_LEN the number of characters in the string "Sir< John Falstaff" -- in this example, the integer value is 17.wwW8; 1 LINE_BEGIN LINE_BEGINC Returns a pattern that matches the beginning-of-line condition. Syntax pattern := LINE_BEGIN CommentsK LINE_BEGIN is a keyword, not a built-in procedure. However, it is used* like a built-in to construct patterns. ExampleE The following procedure erases all RUNOFF commands from a file byG searching for a pattern that has a period (.) at the beginning of a> line and then erasing the lines that match this condition:& PROCEDURE user_delete_runoff_lines+ LOCAL search_runoff, pattern_runoff;* pattern_runoff := LINE_BEGIN + "."; LOOP< search_runoff := SEARCH (pattern_runoff, FORWARD); EXITIF sear1 = 0;# POSITION (search_runoff); ERASE_LINE; ENDLOOP; ENDPROCEDURE; Related topics BEGINNING_OF LINE_ENDwwW8; 1 LINE_END LINE_END= Returns a pattern that matches the end-of-line condition. Syntax pattern := LINE_END ExampleK The following procedure moves the active editing position to the end of+ the line, unless you are already there: PROCEDURE user_end_of_line eol_pattern := LINE_END;2 eol_range := SEARCH (eol_pattern, FORWARD); IF eol_range <> 0$ THEN POSITION (eol_range); ENDIF; ENDPROCEDURE; Related topics END_OF LINE_BEGINwwW8;1 LOCATE_MOUSE LOCATE_MOUSEI Returns information on the window position of the pointer at the timeA the built-in is invoked. Optionally returns a status integer9 indicating whether the pointer was found in a window. Syntax< [integer3 := ] LOCATE_MOUSE (window, integer1, integer2) ParametersF window A parameter to which LOCATE_MOUSE returns theH window in which the pointer is located. If theG pointer is not found, the built-in assigns the< type UNSPECIFIED to this parameter.F integer1 A parameter to which LOCATE_MOUSE returns theH windo w-relative column position of the pointer.J If the pointer is not found, the built-in assigns@ the type UNSPECIFIED to this parameter.F integer2 A parameter to which LOCATE_MOUSE returns theJ window-relative row position of the pointer. YouH can specify the status line using integer2. IfK the pointer is not found, the built-in assigns the<  type UNSPECIFIED to this parameter.G ingeter3 If you specify a return variable, LOCATE_MOUSEI returns 1 if the pointer was found, 0 otherwise. CommentsK In the non-DECwindows version of DECTPU, this built-in can only be usedH in programs, procedures, or learn sequences bound to mouse keys. InG the DECwindows version of DECTPU, LOCATE_MOUSE can be used any timeI after the first keyboard or mouse-button event. The built-in re turnsG the location occupied by the pointer cursor at the time of the most* recent keyboard or mouse-button event. ExampleJ The following statement assigns to the parameter 'window_1' the windowC in which the pointer for the current mouse key is located. TheK statement assigns to the parameter 'window_column' the column where theC pointer is located. the pointer. The statement assigns to the@ parameter 'window_row' the row where the pointer is located.7 LOCATE_MOUSE (window_1, window_column, window_row); Related Topics POSITIONwwg9; 1 LOOKUP_KEY LOOKUP_KEYG Returns the executable code or the comment associated with a specifiedK key. The code can be returned as a program or learn sequence; the comment is returned as a string. SyntaxB variable := LOOKUP_KEY (keyname, {PROGRAM | COMMENT | KEY_MAP} [,string]) ParametersJ keyname Specifies the key (or key combination) you want to find out4 about. (See help on KEYNAMES TABLE.)J PROGRAM Specifies that either a program or a learn sequence will beC returned if the key was defined. If the key was not) defined, zero is returned.I COMMENT Specifies that the comment string will be returned. If no< comment was given, a null string is returned.K KEY_MAP Specifies that the string given for the key map when the key7 was  defined with DEFINE_KEY is returned.I string An optional string that causes the procedure to return theH requested information from the specified key map, or fromH the first definition for the key in the specified key-mapK list. If neither a key map nor a key-map list is specified,D the first definition in the key-map list bound to the* current buffer is returned. Example, 1. programx := LOOKUP_KEY (key1, PROGRAM);K Returns the executable code that is associated with KEY1. The keywordI PROGRAM indicates that the result will be returned in a program or a learn data type.. 2. MESSAGE (LOOKUP_KEY (LAST_KEY, COMMENT));I Displays in the message area the comment that you included with your4 key definition for the last key that you typed. Related topics@ DEFINE_KEY LAST_KEY KEY_NAME Keynames Table READ_KEYwwg9;1 LOWER_WIDGET LOWER_WIDGETJ Places the widget at the bottom of a viewing stack. This prevents theI window associated with the widget from obscuring any sibling windows. Syntax LOWER_WIDGET (widget) ParametersF widget The widget instance you want DECTPU to lower. Comments> The specified widget must be a subclass of WindowObjClass. Related Topics8 CREATE_WIDGET DELETE MANAGE_WIDGET MAP" RAISE_WIDGET REALIZE_WIDGET4 SET(MAPPED_WHEN_MANAGED) UNMANAGE_WIDGET UNMAPwwg9;1 RAISE_WIDGET RAISE_WIDGETK Places the widget at the top of a viewing stack. This insures that theD window associated with the widget is not obscured by any sibling windows. Syntax RAISE_WIDGET (widget) ParametersF widget The widget instance you want DECTPU to raise. Comments> The specified widget must be a subclass of WindowObjClass.< The widget window is mapped if it is not already mapped. Related Topics+ CREATE_WIDGET DELETE LOWER_WIDGET? MANAGE_WIDGET MAP RAISE_WIDGET REALIZE_WIDGET6 SET(MAPPED_WHEN_MANAGED) UNMANAGE_WIDGET UNMAPwwg9;1 MANAGE_WIDGET MANAGE_WIDGETK Makes the specified widget visible, provided the specified widget's parent is visible. Syntax( MANAGE_WIDGET (widget [, widget...]) Parameters@ widget The widget instance you want to manage. Comments@ MANAGE_WIDGET causes the specified widget's parent to becomeI responsible for determining the widget's space requirements. It alsoI causes the parent to determine the widget's visibility depending upon3 the MAPPED_WHEN_MANAGED setting for the widget. ExampleG The following statement manages the widget instance assigned to the variable "sample_x_keypad":$ MANAGE_WIDGET (sample_x_keypad); Related Topics; CREATE_WIDGET GET_INFO(WIDGET_VARIABLE) LOWER_WIDGET= RAISE_WIDGET REALIZE_WIDGET SET(MAPPED_WHEN_MANAGED) UNMANAGE_WIDGETwwg9;1 MAP MAPE Performs either of two functions depending on what parameters you specify.F One variant associates a buffer with a window and makes the windowJ visible on the screen. Before using MAP you must already have created> the buffer and the window. (See help on CREATE_BUFFER and CREATE_WINDOW.)G The other variant makes visible on the screen the DECwindows windowC associated with the specified widget, thereby making the widget visible. Syntax MAP (window, buffer) or MAP (widget) Parameters; window A window that you want to map to the screen.> buffer A buffer you want to associate with the window.3 widget The widget you want to make visible. CommentsF MAP (widget) calls the Xlib routine XMapWindow to map the wi dget's$ DECwindows window to the screen.3 MAP (widget) is useful for the following tasks:? 1. To make DECTPU's top-level widget visible sooner in theK intitialization process than would happen by default. For example,J MAP (widget) is useful for enabling an application to display userK information in a widget before the application's DECwindows startup is completed.J 2. To make the specified widget visible again if it has been unmapped  during a session. Examples' 1. MAP (main_window, main_buffer);J Associates the main buffer with the main window, and maps the main window to the screen. 2. MAP (example_widget);F Causes the widget assigned to the variable "example_widget" toE become visible, assuming that the widget has been created and managed but not mapped.F 3. The following procedure creates a message buffer and a messageF window; it  then associates the message buffer with the message9 window and maps the message window to the screen:% PROCEDURE user_message_window9 ! Create a message buffer and a message window7 message_buffer := CREATE_BUFFER ("message");8 message_window := CREATE_WINDOW (23, 2, OFF);: ! Set the attributes of the buffer and window. SET (EOB_TEXT, message_buffer, "");* SET (NO_WRITE, message_buffer);( SET (SYSTEM, message_buffer);- SET (VIDEO, message_window, NONE);0 MAP (message_window, message_buffer); ENDPROCEDURE; Related topics, CREATE_BUFFER CREATE_WINDOW DELETE2 LOWER_WIDGET MANAGE_WIDGET RAISE_WIDGETD REALIZE_WIDGET SET(MAPPED_WHEN_MANAGED) UNMANAGE_WIDGET UNMAPwww*9;1 MARK MARKH Returns a marker located in the specifed buffer, column, and record.F By default, the marker returned is located on the character in theI current buffer to which the editing point is tied. The MARK built-inK also sets the video attribute for displaying the character on which theD marker is located (if any) when that character is visible on the screen. Syntax> marker := MARK ({NONE | BLINK | BOLD | REVERSE | UNDERLINEC | FREE_CURSOR} [, {buffer | window} [, integer1# [, integer2]]]) Parameters> NONE Applies no video attributes to the marker./ BLINK Causes the marker to blink.3 BOLD Causes the marker to be bolded.G REVERSE Causes the marker to be displayed in reverse video.7 UNDERLINE Causes the marker to be underlined.G FREE_CURSOR Creates a free marker if you use the statement MARKC (FREE_CURSOR) while the cursor is at a locationJ containing no character, such as a location beyond theI end of a line. A free marker has no video attribute.H DECTPU does not insert padding blanks between a freeE marker and the nearest character. If you use theI statement MARK (FREE_CURSOR) while the cursor is on aB character, the resulting marker is tied to the. character and is not free.H buffer The buffer in which the marker is to be located. ByJ default, DECTPU loca tes markers in the current buffer.H window The window that is mapped to the buffer in which theF marker is to be located. You can specify a windowJ variable only if the window is mapped to a buffer. ByJ default, DECTPU locates markers in the current buffer.H integer1 The screen column corresponding to the buffer offsetD where the marker is to be located. This integerE specifies the marker's location in the horizontalK dimension. You can specify any integer greater than orF equal to 1 without causing an error. However, theI maximum record length in DECTPU is 32,767 characters.F If you specify an integer greater than 32,767, theI record is truncated after the 32,767th character. IfI you specify an integer smaller than the record's leftF  margin or greater than the end of the line, DECTPUK places the marker in the specified location and insertsK padding blanks in the buffer between the marker and theK nearest text. By default, DECTPU locates the marker inI the buffer offset corresponding to the current screenJ column. Note that DECTPU performs the conversion fromF screen column to buffer offset for y ou; you merelyJ specify the desired screen column. Note, too, that inD cases where a window has been shifted, you stillJ specify the column in relation to screen column 1 (theJ leftmost column on the screen), not in relation to the3 leftmost visible screen column.I integer2 The number of the record in the buffer where the markJ is to be located. This integer specifies the marker'sH location in the vertical dimension. If no limit hasJ been set on the maximum number of lines in the buffer,J this parameter can have any integer value greater thanK or equal to 1. If a limit has been set for the maximumF number of records in the buffer, the value of thisJ parameter must be less than or equal to the limit. ByD default, DECTPU pl aces the marker in the current record. CommentsD If you create a marker in a location containing no character andF specify a parameter other than FREE_CURSOR, DECTPU inserts paddingC blanks between the marker and the nearest character. In such aF situation, the marker is bound. If you fill text containing theseI padding blanks, the white space created by the blanks is preserved in the filled text.H If you use the optional parameters to sp ecify a location that has noF text associated with it, DECTPU places padding blanks in the space5 between the new marker and the nearest character.D If you create a marker in a location containing no character andE specify the parameter FREE_CURSOR, DECTPU does not insert paddingH blanks. If you fill text surrounding this marker, no white space is created in the filled text.I Once a marker is tied to a character, it cannot become a free marker.K To determine whether a marker is bound or free, use the following call:< boolean_variable := GET_INFO (marker_variable, "bound");H To determine the number of character positions between a free marker6 and the nearest character, use the following call:C boolean_variable := GET_INFO (marker_variable, "glyph_offset");K To determine why a marker is free rather than bound, use one or more of the following calls:A boolean_variable := GET_INFO (marker_variable, "before_bol");A  boolean_variable := GET_INFO (marker_variable, "beyond_eol");D boolean_variable := GET_INFO (marker_variable, "middle_of_tab");A boolean_variable := GET_INFO (marker_variable, "beyond_eob"); Examples, 1. user_mark_under := MARK (UNDERLINE);I Puts a marker at the row and column position corresponding to theJ active editing point. On the screen, the character at that marker is underlined.C 2. remote_marker := MARK (FREE_CURSOR, CURRENT_BUFFER, 1, 50);J Puts a free marker in the current buffer in the leftmost character" offset on the 50th record. Related topics. POSITION SELECT CREATE_RANGE FILLwww*9;1 MATCH MATCHE Returns a pattern that matches all the characters starting at theE current character position and continuing up to and including theG sequence of characters specified in the parameter string, range, orH buffer. The pattern that MATCH returns does not cross record (line) boundaries. Syntax0 pattern := MATCH ({string | range | buffer}) ParametersK string A quoted string or an expression that evaluates toJ a string. MATCH stops matching when it finds the, end of this string.E range A range or an expression that evaluates to aI range. MATCH forms a string out of the contentsH of th e range and stops matching when it reaches9 the end of the resulting string.F buffer A buffer or an expression that evaluates to aJ buffer. MATCH forms a string out of the contentsI of the buffer and stops matching when it reaches9 the end of the resulting string. ExamplesI The following assignment statement stores in pat1 a pattern that willD match a string of ch aracters starting with the current character6 position up to and including the characters "abc". pat1 := MATCH ('abc');H The following procedure finds text within double angle brackets. ItJ moves the current character position to the beginning of the bracketedI text, if it exists. For example, this procedure would match the text <>.! PROCEDURE user_angle_brackets, paren_text := '<<' + MATCH ('>>');G found_range := SEARCH_QUIETLY (paren_text, FORWARD, NO_EXACT);& IF found_range = 0 ! No match, THEN MESSAGE ('No match found.');& ELSE POSITION (found_range); ENDIF ENDPROCEDURE Related Topics SEARCH SEARCH_QUIETLYwww*9; 1 MESSAGE MESSAGEI Depending on which syntax format you choose, MESSAGE performs one of the following tasks:G o Puts the characters you specify into the message buffer if there isE one. By default, DECTPU looks for a buffer named MESSAGE_BUFFER.F Otherwise, the message is displayed at the current location on the9 device defined by SYS$OUTPUT (usually your terminal).J o Fetches text associated with a message code and formats the text usingK FAO directives. The resulting text is put in the MESSAGE_BUFFER or, ifE now such buffer is present, is displayed on the device defined by SYS$OUTPUT. Syntax4 MESSAGE ({buffer | range | string} [, integer1]) ORB MESSAGE ({keyword | integer2} [, integer3 [, FAO parameters]]) ParametersE buffer A buffer whose contents you want displayed in the! message area.D range A range whose contents you want displayed in the! message area.A string A string to be displayed in the message area.E integer1 An integer indicating the severity of the messageK placed in the message buffer. The allowable values and2  their meanings are as follows:( Integer Meaning( -----------------( 0 Warning( 1 Success& 2 Error. 3 InformationalD keyword The DECTPU keyword representing the message code; associated with the text to be fetched.H integer2 The integer representing the message code asso ciated0 with the text to be fetched.K integer3 A bit-encoded integer controlling which portions of theF message are fetched. If the message flags are notJ specified, or if the value of a message flag is set to= zero, then the value specified by the SETI (MESSAGE_FLAGS...) built-in is used. The meanings of5 the message flags are as follows:7 Bi t DECTPU Constant MeaningO -----------------------------------------------------------G 0 TPU$K_MESSAGE_TEXT Include text of messageJ 1 TPU$K_MESSAGE_ID Include message identifierF 2 TPU$K_MESSAGE_SEVERITY Include severity level9 indicatorE 3 TPU$K_MESSAGE_FACILITY Include facility nameH FAO parameters Strings and integers to be substituted into the textJ associated with the message code. The message code isI specified by the first parameter. FAO directives forI substituting strings and integers are provided withinJ the message text. A maximum of 127 FAO parameters areJ allowed. For a description of the FAO directives, seeG the VMS System Services Reference Manual. For moreF  information on the FAO built-in in DECTPU, see theH description of that built-in in Chapter 4 of the DEC3 Text Processing Utility Manual. CommentsH The first syntax format puts the specified characters in the messageI buffer if one exists. If the message buffer is not associated with aK message window, messages are written to the buffer but do not appear on the screen.G The second syntax format causes DECTPU to fetch the text associatedJ with a message code, format the text using FAO directives, and displayH the formatted message in the message buffer. The difference betweenF this operation and the operation performed by MESSAGE_TEXT is thatJ MESSAGE_TEXT simply returns the resulting string, while MESSAGE places% the string in the message buffer. Examples 1. MESSAGE ("Nevermore!");9 Writes the text "Nevermore!" in the message area.G 2. The following procedure checks if the cursor is at the end of a0 line and writes the appropriate message: PROCEDURE user_test_eol* the_mark := MARK (FREE_CURSOR);B IF LENGTH (CURRENT_LINE = GET_INFO (the_mark, "offset") THEN: user_at_eol := 1; ! yes -- return true? MESSAGE ("Cursor is at the end of the line."); ELSE: user_at_eol := 0; ! no -- return false? MESSAGE ("Cursor not  the at end of a line."); ENDIF; ENDPROCEDURE;D 3. The following statement fetches the text associated with theJ message code TPU$_OPENIN and substitutes the string "FOO.BAR" intoE the message. All of the text of the message is fetched. TheK string "Error opening FOO.BAR as input" is displayed in the message buffer.= MESSAGE (tpu$_openin, TPU$K_MESSAGE_TEXT, "FOO.BAR"); Related Topics MESSAGE_TEXT FAOww Q9;1 MESSAGE_TEXT MESSAGE_TEXTJ Allows you to fetch the text associated with a message code. Also allowsF you to substitute strings or integers into the text. MESSAGE_TEXT isJ especially useful if you access DECTPU through the callable interface and link in your own message file. Syntax? [string := ] MESSAGE_TEXT ({integer1 | keyword} [, integer23 [, FAO parameters]]) ParametersI keyword The keyword for the  message code associated withI the text that is to be fetched. DECTPU providesJ keywords for all the message codes used by DECTPU! and EVE.I integer1 The integer for the message code associated with8 the text that is to be fetched.I integer2 A bit-encoded integer controlling which portionsJ of the message are fetched. If the message fla gsH are not specified, or if the value of a messageI flag is set to zero, then the value specified byJ the SET (MESSAGE_FLAGS...) built-in is used. TheF meanings of the message flags are as follows:. Bit DECTPU Constant Meaning= 0 TPU$K_MESSAGE_TEXT Include text of message@ 1 TPU$K_MESSAGE_ID Include message identifierF 2 TPU$K _MESSAGE_SEVERITY Include severity level indicator; 3 TPU$K_MESSAGE_FACILITY Include facility nameH FAO parameters Strings and integers to be substituted into theD text associated with the message code. TheJ message code is specified by the first parameter.D FAO directives for substituting strings andJ integers are provided within the message text. AJ  maximum of 127 FAO parameters are allowed. For aG description of the FAO directives, see the VMSD System Services Reference Manual. For moreK information on the FAO built-in in DECTPU, see theI description of that built-in in Chapter 4 of the< DEC Text Processing Utility Manual. ExampleM openin_text := MESSAGE_TEXT (tpu$_openin, TPU$K_MESSAGE_TEXT, "FOO.BAR");D Fetches the text associated with the message code TPU$_OPENIN. TheE statement substitutes the string "FOO.BAR" into the message. DECTPUK fetches the entire text of the message. The string "Error opening FOO.BAR1 as input" is stored in the variable OPENIN_TEXT.wwQ9;1 MODIFY_RANGE MODIFY_RANGEE Allows a DECTPU application to change the starting delimiter, ending* delimiter, or video attribute of a range. Syntax< MODIFY_RANGE (range, [{start_mark | delimiting_keyword},: {end_mark | delimiting_keyword}], [,video_attribute]) Parameters2 range The range to be modified.9 start_mark The starting mark for the range.7 end_mark The ending mark for the range.K delimiting_keyword A keyword indicating the point in the buffer whereG you want the range to begin or end. The validC keyword s and their meaning are as follows:0 Keyword Meaning0 ------- -------E LINE_BEGIN The beginning of the current? buffer's current line.? LINE_END The end of the current? buffer's current line.@ BUFFER_BEGIN Line 1, offset 0 in theA  current buffer. This isA the first position where= a character could be@ inserted, regardless ofE whether there is a characterD there. This is the same asA the point referred to byG BEGINNING_OF (CURRENT_BUFFER).A BUFFER_END The last position in theA buffer where a characterF could be inserted, regardlessH of whether there is a characterD there. This is the same asA the point referred to byA END_OF (CURRENT_BUFFER) .I video_attribute A keyword specifying the new video attribute forE the range. By default, the attribute is notK modified. You can use the keywords NONE, REVERSE,B UNDERLINE, BLINK, or BOLD to specify this# parameter. CommentsK If you want to specify the fourth parameter (the attribute) but not theK second and third (the start and end delimiters), you must use commas as placeholders, as follows:' MODIFY_RANGE (the_range, , ,BLINK); ExamplesE 1. The following statement sets the video attribute of the range7 assigned to the variable "this_range" to BLINK:, MODIFY_RANGE (this_range, , ,BLINK);K 2. The following statement alters the delimiters of the range assignedK to the variable "the_range" so the range begins at the point marked; by "mark1" and ends at the end of the current line:2  MODIFY_RANGE (the_range, mark1, LINE_END);G 3. The following code fragment creates a range between the editingG point and the pointer cursor location. At a later point in theJ program, after which the user might have moved the pointer cursor,G the code fragment modifies the range to reflect the new pointer cursor location." begin_mark := MARK (BOLD); POSITION (MOUSE);# finish_mark := MARK (BOLD);C this_range := CREATE_RANGE (begin_mark, finish_mark, BOLD); ! .) ! . (User may have moved mouse) ! . POSITION (MOUSE); new_mark := MARK (BOLD);" IF new_mark <> finish_mark THENB MODIFY_RANGE (this_range, begin_mark, new_mark, BOLD); ENDIF; Related Topics MARK CREATE_RANGEwwQ9;1 MOVE_HORIZONTAL MOVE_HORIZONTALI Moves the active editing position left or right in the current buffer byJ the number of characters specified. MOVE_HORIZONTAL is bound to the textG in the buffer and will wrap to the next or previous line if necessary. Syntax MOVE_HORIZONTAL (integer) ParametersC integer The number of characters the editing position moves.H Positive values are to the right. Negative values are to the left. ExampleJ The following procedure moves the editing position by eight-line sections, and puts the cursor at the start of a line: PROCEDURE user_move_by_lines% IF CURRENT_DIRECTION = FORWARD THEN; MOVE_VERTICAL (+8); ! down a section ELSE9 MOVE_VERTICAL( -8); ! up a section ENDIF;@ MOVE_HORIZONTAL (-CURRENT_OFFSET); ! go to start of line ENDPROCEDURE; Related topics& CURSOR_HORIZONTAL MOVE_VERTICALwwQ9; 1 MOVE_TEXT MOVE_TEXTI Moves the text you specify, putting it before the current position inJ the current buffer. The text is entered according to the current mode) of the buffer (INSERT or OVERSTRIKE). Syntax8 [range1 := ] MOVE_TEXT ({ string | range2 | buffer}) Parameters= range1 A range where the copied text has been placed.. string A string that you want to copy.I range2 A range that contains the text you want to move. The text5 is removed from its original location.J buffer A buffer that contains the text you want to move. The text5 is removed from its original location. CommentsH If the current buffer is in insert mode, the text is inserted beforeD the current position in the buffer. If the current buffer is inJ overstrike mode, the moved text replaces existing text starting at theK current position and continuing for the length of the string, range, or buffer.0 You can not add a buffer or range to itself.I If the current buffer is mapped to a visible window, MOVE_TEXT causesI DECTPU to synchronize the active editing point with the active cursorJ position. As a result, DECTPU may insert padding blanks if the cursor2 position is not on a character or blank space. Examples+ 1. MOVE_TEXT ("The readiness is all");B Copies the string, putting it before the current position. 2. MOVE_TEXT (main_buffer);H Removes text from the main buffer and puts it before the current' position in the current buffer. Related topics- COPY_TEXT SET(INSERT) SET(OVERSTRIKE)wwx9;1 MOVE_VERTICAL MOVE_VERTICALJ Moves the active editing position up or down in the current buffer by the number of rows specified. Syntax MOVE_VERTICAL (integer) ParametersG integer The number of rows the editing position moves. PositiveK values are down (toward the bottom of the buffer). Negative<  values are up (toward the top of the buffer). CommentsE By default, DECTPU keeps the cursor at the same offset on each line.G However, since DECTPU counts a tab as one character, regardless of howI wide the tab is, the column position of the cursor may vary greatly from1 line to line even though the offset is the same.J To keep the cursor in approximately the same column on each line, use the following statement:# SET (COLUMN_MOVE_VERTICAL, ON);K This statement directs DECTPU to keep the cursor in the same column unlessE a tab character makes this impossible. If a tab occupies the column? position, DECTPU moves the cursor to the beginning of the tab. ExampleK The following procedure moves the current character position by eight-line5 sections and puts the cursor at the start of a line: PROCEDURE user_move_by_lines% IF CURRENT_DIRECTION = FORWARD THEN: MOVE_VERTICAL (+8); ! down a section   ELSE8 MOVE_VERTICAL( -8); ! up a section ENDIF;? MOVE_HORIZONTAL (-CURRENT_OFFSET); ! go to start of line ENDPROCEDURE; Related topicsA CURSOR_VERTICAL MOVE_HORIZONTAL SET(COLUMN_MOVE_VERTICAL)wwx9;1 NOTANY NOTANYI Returns a pattern that matches one or more characters that are not inK the set of characters specified by the string, range, or buffer that is used as a parameter. Syntax> pa !ttern := NOTANY ({string | range | buffer} [, integer1]) ParametersK string A quoted string or an expression that evaluates toK a string. NOTANY matches any character not in theC set of characters contained in the string.E range A range or an expression that evaluates to aH range. NOTANY matches any character not in theB set of characters contained in "the range.F buffer A buffer or an expression that evaluates to aI buffer. NOTANY matches any character not in theC set of characters contained in the buffer.B integer1 An integer indicating how many contiguousJ characters NOTANY is to match. The default is 1. CommentsH The text to be searched must all appear on one line; NOTANY does not span line breaks. Example# pat1 := NOTANY ('XYZ')I This assignment statement creates a pattern that will match the firstK character that is not in the set of characters consisting of (X, Y, andG Z). The match will fail if no characters other than X, Y, or Z are found. Related Topics4 ANY SCAN SCANL SEARCH SEARCH_QUIETLYwwx9; 1 NOTANYL NOTANYL. The NOTANYL built-in is not yet available.A To return to help on EVE commands, type EVE and press RETU$RN./ For help on the keypad, press the HELP key.+ To exit from help, simply press RETURN.wwx9; 1 POSITION POSITIONE Moves the active editing point to a new location. POSITION does notJ always synchronize the cursor position with the editing point; it does so: only if the current buffer is mapped to a visible window. SyntaxA POSITION ({buffer | marker | range | window | integer | MOUSED | LINE_BEGIN | LINE_END | BUFFER_BEGIN | BUFF%ER_END}) ParametersJ buffer The buffer in which you want to establish the editing point> (the last position you occupied in the buffer).K marker The marker at which you want to establish the editing point.J When you position to a marker, the character or location toH which the marker is tied becomes the active point and theI buffer where the marker is located becomes the new current buffer.H range & The range to which you want to move the active point (theA beginning of the range). Also moves to the buffer% containing that range.I window The window in which you want to put the editing point (theI row and column position you last occupied in that window).7 The window must be mapped to the screen.I integer The number of the record where you want DECTPU to positionD the editing point. The s 'tatement POSITION (0) has no6 effect, but does not generate an error.I MOUSE A keyword specifying that the cursor is to be moved to theJ window and buffer pointed to by the mouse. The location ofH the mouse becomes the editing point, the window where theG mouse is located becomes the new current window, and theH buffer where the mouse is located becomes the new currentI buffer. In the non-DECwindow(s version of DECTPU, POSITIONK (MOUSE) is only valid during a procedure that is executed asG a result of a mouse click. In the DECwindows version ofH DECTPU, you can use the statement POSITION (MOUSE) at anyI point after the first keyboard or mouse button event. TheD statement positions the editing point to the locationE occupied by the pointer cursor at the time of the most5 recent keyboard ) or mouse-button event.I LINE_BEGIN A keyword specifying that the cursor is to be moved to the- beginning of the current line.I LINE_END A keyword specifying that the cursor is to be moved to the' end of the current line.J BUFFER_BEGIN A keyword specifying that the cursor is to be moved to lineD 1, offset 0 in the current buffer. This is the firstJ position where a character could be inserted, regardless ofK * whether there is a character there. This is the same as theI point referred to by BEGINNING_OF (CURRENT_BUFFER). It isC more efficient to use BUFFER_BEGIN than BEGINNING_OF (CURRENT_BUFFER).I BUFFER_END A keyword specifying that the cursor is to be moved to theE last position in the buffer where a character could beJ inserted, regardless of whether there is a character there.B This is the same +as the point referred to by END_OFH (CURRENT_BUFFER). It is more efficient to use BUFFER_END, than END_OF (CURRENT_BUFFER). Examples 1. user_mark := MARK(NONE); POSITION (user_mark);J Sets the current character position to the marker associated with the variable USER_MARK.H 2. The following procedure changes position from one window to another0 (when there are two windows on the screen):* PROCEDURE user_switch_window_position,' IF CURRENT_WINDOW = main_window THEN' POSITION (extra_window); ELSE& POSITION (main_window); ENDIF; ENDPROCEDURE; Related topicsB CURRENT_BUFFER CURRENT_WINDOW LOCATE_MOUSE MARK UPDATEwwx9;1 QUIT QUIT< Ends the editing session without writing an output file. Syntax" QUIT [{ OFF | ON} [,severity]] ParametersK OFF Tells DECTPU not to check if an-y buffers have been modified.F ON Tells DECTPU to check if any buffers have been modified5 before quitting. This is the default.F severity An integer specifying the severity for the TPU$_QUITINGC status code returned by TPU$CONTROL. The default is success. CommentsH If you do not specify the OFF keyword, then on quitting, if you haveC modified any buffers that have not been SET (NO_WRITE,...), the following .prompt appears:J Buffer modifications will not be saved, continue quitting (Y or N)?G If you want to quit (ending the editing session and discarding yourJ edits), enter Yes. If you want to continue the editing session, enterH No. If no buffers have been modified, QUIT ends the session without prompting you. Examples 1. QUIT (OFF);E Ends the session, and does NOT check if any buffers have been modified.K 2. The following example /shows the use of QUIT at the end of a command+ file used to create a section file: . . POSITION (main_window); tpu$local_init; user$define_keys;% SAVE (mysecfile.tpu$section); QUIT; Related topics8 EXIT SET(NO_WRITE) SET(OUTPUT_FILE) WRITE_FILEww9; 1 READ_CHAR READ_CHARC Stores in a string variable the next character entered from theI keyboard. This char 0acter is not echoed on the screen; therefore, the" cursor position does not move.G Note: Using READ_CHAR is NOT recommended, because it does not processJ escape sequences. If you enter escape sequences or other non-text! characters, use READ_KEY.J In the DECwindows version of DECTPU, the READ_CHAR built-in cannotH read a keypad key or a function key. If a DECTPU procedure usesJ READ_CHAR and the user presses a keypad or function key, READ_CHARF 1 returns a null string and signals the warning TPU$_NOCHARREAD. Syntax string := READ_CHAR Examples 1. new_char := READ_CHARK Stores in the variable NEW_CHAR the next character entered from the keyboard.E 2. The following procedure puts into the current buffer the nextK character entered from the keyboard. If a key that sends an escapeG sequence is pressed, the entire escape sequence is put into the+ buffer, as i2f it were regular text.& PROCEDURE user_quote_character! COPY_TEXT (READ_CHAR); ENDPROCEDURE; Related topics, ASCII COPY_TEXT READ_KEY READ_LINEww9;1 READ_CLIPBOARD READ_CLIPBOARDJ Reads string-formatted data from the clipboard. Copies the data into theG current DECTPU buffer at the editing point, using the buffer's current" text mode (INSERT or OVERSTRIKE). Syntax+ [range | unspecified] := READ_CLIPBOARD 3 ParametersD range A range containing the text copied into the( current buffer.I UNSPECIFIED A data type indicating that no data was obtained, from the clipboard. CommentsJ If DECTPU finds a line-feed character in the data, it removes the lineK feed and any adjacent carriage returns and puts the data after the lineJ feed on the next line of the buffer. If DECTPU must truncate the dataI from4 the clipboard, DECTPU copies the truncated text into the current buffer.J All text read from the clipboard is copied into the buffer starting atK the editing point. If DECTPU must start a new line to fit all the textI into the buffer, the new line starts at column 1, even if the current' left margin is not set at column 1. ExampleI The following statement copies the contents of the clipboard into the current buffer: READ_CLIPBOARD;ww59; 1 READ_FILE READ_FILEI Reads a file you specify, adding its contents before the current lineJ in the current buffer; optionally returns a string containing the fileD specification of the file to be read. DECTPU displays a message2 indicating how many records (lines) were read. Syntax$ [string2 :=] READ_FILE (string1) ParametersH string1 Specifies the file you want to read into the current buffer. Examples* 1. READ_FILE ("SYS$LOGIN:LO 6GIN.COM");J Reads your login file from your top-level, login directory, adding+ its contents to the current buffer.D 2. The following procedure creates a second window and a secondF buffer, maps the window to the screen, and prompts the user to2 specify the file to include in the buffer:' PROCEDURE user_edit_second_file0 window2 := CREATE_WINDOW (1, 10, ON);6 buffer2 := CREATE_BUFFER ("second_buffer");" MAP (window2,7 buffer2);F READ_FILE (READ_LINE ("Enter file name for 2nd window: "));- POSITION (BEGINNING_OF (buffer2)); ENDPROCEDURE; Related topics9 CREATE_BUFFER CURRENT_BUFFER MOVE_TEXT WRITE_FILEww9;1 READ_GLOBAL_SELECT READ_GLOBAL_SELECTK Gets information from or about a global selection. Copies the informationE into DECTPU'S current buffer at the editing point using the buffer'sH current text mode (INSERT or OVERSTRIKE). Also8 puts line breaks in the text copied into the buffer. SyntaxF [range | UNSPECIFIED := ] READ_GLOBAL_SELECT ({PRIMARY | SECONDARYL | selection_name_string},: string) ParametersG range A range containing the string copied to the# buffer.G UNSPECIFIED A data type indicating that the informationH 9 requested by the layered application was not& available.A PRIMARY A keyword indicating that the layeredJ application is requesting information about or> from the PRIMARY global selection.A SECONDARY A keyword indicating that the layeredJ application is requesting information about or@ from the SECONDARY global :selection.J selection_name_string A string identifying the global selection thatG is the subject of the layered application'sK information request. You specify the selectionG name as a string if the layered applicationJ needs information about a selection other thanF the PRIMARY or SECONDARY global selection.J string The string-f ;ormatted information returned fromE the global selection. If the informationB requested was in integer format in theF DECwindows environment, READ_GLOBAL_SELECTE converts the information to string formatC before copying it to the DECTPU buffer. CommentsF All text read from the primary global selection is copied into theI current buffer starting <at the editing point. If DECTPU must start aH new line to fit all the text into the buffer, the new line starts atE column 1, even if the current left margin is not set at column 1.D If the global selection information requested is an integer, theJ built-in converts the integer into a string before copying it into theK current buffer. If the information requested is a string, the built-inI copies the string into the buffer, replacing any line feeds with line breaks=. ExampleF The following statement reads the string-formatted contents of theI primary global selection and copies it into the current buffer at the current location.. READ_GLOBAL_SELECTION (PRIMARY, "STRING");ww9; 1 READ_KEY READ_KEYK Waits for you to press a key and then returns the keyword for that key.J The key is not echoed on the terminal screen. Use READ_KEY instead ofG READ_CHAR when you are entering escape sequences, control >codes, orK other non-text characters. READ_KEY processes escape sequences and the DECTPU SHIFT_KEY. Syntax keyword := READ_KEY Examples 1. my_key := READ_KEY;K Stores in the variable MY_KEY the keyword for the next key entered.K 2. The following procedure sets the SHIFT_KEY to the last (or current)H key, reads the next key, and returns the keyname for the shifted key:$ PROCEDURE user_get_shift_key5 ! Keyw?ord for key pressed after shift key LOCAL key_to_shift;% SET (SHIFT_KEY, LAST_KEY);: key_to_shift := KEY_NAME (READ_KEY, SHIFT_KEY);! RETURN (key_to_shift); ENDPROCEDURE; Related topicsI DEFINE_KEY KEY_NAME LAST_KEY LOOKUP_KEY READ_CHAR SHIFT_KEYww9; 1 READ_LINE READ_LINEE Displays the specified text as a prompt and reads the informationH entered in response. You can specify the number o@f characters to beI read in response. READ_LINE returns a string that holds data entered in the response. Syntax/ string2 := READ_LINE [(string1 [,integer])] ParametersH string1 A string to be used as the prompt for input. By default,D the text is written in the prompt area on the screen.I integer The number of characters to read from the input entered inI response to the prompt. The maximum is 132. If READ_LINEI A terminates because it reaches the limit of characters, theH last character read becomes the last key. (See example 2 below.) CommentsK The terminators for READ_LINE are the standard VMS terminators, such as? CTRL/Z and RETURN. READ_LINE is not affected by DECTPU keyJ definitions; the built-in reads literally all keys except standard VMS terminators. Examples< 1. my_prompt := READ_LINE ("Enter key definition:", 1);F B Displays the quoted text in the prompt area, and stores in the? variable MY_PROMPT the first character of the response.I 2. The following procedure prompts for three characters, stores themJ in the variable MY_INPUT, and then tests for the last key entered:$ PROCEDURE user_test_last_key LOCAL my_key;A my_input := READ_LINE ("Enter three characters: ", 3);# ! Press the keys "END" my_key := LAST_KEY;% IF myC_key = KEY_NAME ("D") THEN# MESSAGE ("D key"); ELSE& MESSAGE ("Error..."); ENDIF; ENDPROCEDURE; Related topics# LAST_KEY READ_CHAR READ_KEYww9;1 REALIZE_WIDGET REALIZE_WIDGET9 Creates a DECwindows window for the specified widget. Syntax REALIZE_WIDGET (widget) ParametersH widget The widget instance you want DECTPU to realize. D CommentsH You can realize a widget only once during the widget's lifetime. IfJ the specified widget is a composite widget, REALIZE_WIDGET recursively/ realizes all the widget's managed children.I REALIZE_WIDGET interacts with the widget's mappedWhenManaged resourceD to determine if the widget should also be mapped to the display. Related Topics2 CREATE_WIDGET DELETE MANAGE_WIDGET MAP4 SET(MAPPED_WHEN_MANAGED) UNMANAGE_WIDGET UNMAPwwE9;1 RECOVER_BUFFER RECOVER_BUFFERD Reconstructs the work done in the buffer whose name you specify.J DECTPU creates a new buffer using the specified buffer name and, usingK the information in the original buffer's journal file, recovers all theI changes made to records in the original file. The resulting recovery+ is written to the newly created buffer. SyntaxI new_buffer := RECOVER_BUFFER (old_buffer_name, [, [journal_file_name]F F template_buffer]]) ParametersJ old_buffer_name The name of the buffer you are trying to recover.H journal_file_name The name of the journal file you want DECTPU toJ use to recover your buffer. If you did not set aJ journal file name using SET (JOURNALING), in mostH cases DECTPU will have created the journal fileI using its default journal file naming G algorithm.K If the journal file was named by default, you need= not specify a journal file name withI RECOVER_BUFFER. If you specified a journal fileG name using SET (JOURNALING), use the same name- with RECOVER_BUFFER.H template_buffer The buffer whose attributes you want applied toK the newly created buffer. For more information onHJ using a buffer as a template, see HELP or the DEC> Text Processing Utility Manual on the0 CREATE_BUFFER built-in. CommentsG Only the first parameter (the old buffer name) is required. If youJ want to specify the third parameter but not the second, you must use a' comma as a placeholder, as follows:3 RECOVER_BUFFER ("junk.txt", , template_buffer);/ The third parameter is completely optional I.I If DECTPU returns a message that it cannot find the journal file, andG if the buffer you are trying to recover is small, the reason may beG that records from the buffer were never written to the journal fileD because there were not enough records to trigger the first writeF operation to the journal file. Similarly, if some text is missingJ after recovery, the reason may be that the last few operations did notJ trigger a write operation. For more information on ho Jw DECTPU managesH write operations to a journal file, see HELP on the SET (JOURNALING) built-in.J Buffer change journaling does not journal changes in buffer attributesH (such as modifiability of the buffer or visibility of tabs). BufferK change journaling only tracks changes to records in the buffer, such asD addition, deletion, or modification of a record, or changes in a record's attributes.F If you press CTRL/C during a recovery, DECTPU aborts the recovery,KB closes the journal file, and deletes the newly created buffer.H After a successful recovery, DECTPU continues journaling new changes< into the journal file that was used during the recovery. Example# 1. RECOVER_BUFFER ("junk.txt")H Directs DECTPU to find the buffer-change journal file associatedG with the original buffer JUNK.TXT. Creates a new buffer calledH JUNK.TXT. Using the information from the journal file, recoversG the changes Lmade in the original JUNK.TXT buffer and places the; results of the recovery in the new JUNK.TXT buffer.I 2. The following code fragment creates a defaults buffer, changes anI attribute of the defaults buffer, and creates a user buffer. TheI fourth statement turns on buffer-change journaling and designatesH the file named USER1_JOURNAL.TPU$JOURNAL as the journaling file.K At some later point in the session (represented by the elipses) theK MRECOVER_BUFFER statement is used to recover the contents of the oldA USER1.TXT by recovering the contents of the journal file,I USER1_JOURNAL.TPU$JOURNAL. The attributes of the defaults bufferI are applied to the newly created buffer USER1.TXT. In this case,I the new buffer has the end-of-buffer text "[That's all, folks!]".9 defaults_buffer := CREATE_BUFFER ("Defaults");C SET (EOB_TEST, defaults_buffer, "[That's all, folks!]");K N user_buffer := CREATE_BUFFER ("user1.txt", "", defaults_buffer);J SET (JOURNALING, user_buffer, ON, "user1_journal.tpu$journal"); . . .D RECOVER_BUFFER ("user1.txt", "user1_journal.tpu$journal",* defaults_buffer); Related Topics9 CREATE_BUFFER GET_INFO(BUFFER_VARIABLE), GET_INFO(STRING_VARIABLE) JOURNAL_OPEN/ JOURNAL_CLOSE SET(JOURNALING)ww O9; 1 REFRESH REFRESHI Repaints the whole screen, erasing any extraneous characters (such asG those caused by noise on a communication line), and repositions theE text so the screen represents the last known state of the editing context.G REFRESH redraws each line of each window mapped to the screen. TheD prompt area is erased. The screen changes immediately: even ifK REFRESH is done from within a procedure, DECTPU does not wait until the5 enPtire procedure is completed to execute REFRESH. ExampleF The following procedure erases the message buffer and repaints the screen: PROCEDURE user_repaint ERASE (message_buffer); REFRESH; ENDPROCEDURE; Related topics MESSAGE UPDATEww9;1 REMAIN REMAIND Returns a pattern matching any string that starts at the currentI character position and continues to the end of the current line. The4 pattern returnQed does not cross line boundaries. Syntax pattern := REMAIN Example0 pattern_runoff := LINE_BEGIN + "." + REMAIN;K Stores in the variable PATTERN_RUNOFF a pattern matching all lines thatI have a period at the beginning of the line (such as RUNOFF commands).ww9;1 REMOVE_KEY_MAP REMOVE_KEY_MAP3 Removes key maps from one or all key-map lists. Syntax, REMOVE_KEY_MAP (string1, string2 [,ALL]) ParametersK string1 R Specifies name of the key-map list containing the key map to be removed.G string2 Specifies the name of the key map to be removed from the key-map list.H ALL Optionally, specifies that all the key maps with the nameF specified by string2 are to be removed from the key-map list. ExamplesJ The following example creates a key-map list name MY_KEYMAP_LIST. TheJ call to SHOW (KEY_MAP_LISTS) shows the key S-map list contains three keyE maps: KEYMAP_1, KEYMAP_2, and KEYMAP_1 again. After the call toJ REMOVE_KEY_MAP, another call to SHOW (KEY_MAP_LISTS) shows the key-map list contains only KEYMAP_2.1 user$keymap_1 := CREATE_KEY_MAP ("keymap_1");1 user$keymap_2 := CREATE_KEY_MAP ("keymap_2");> user$keymap_list := CREATE_KEY_MAP_LIST ("my_keymap_list",6 user$keymap_1, user$keymap_2);: ADD_KEY_MAP (user$keymap_list, "last", user$keymap_1); T ~. ~. SHOW (KEY_MAP_LISTS); ~. ~.: REMOVE_KEY_MAP (user$keymap_list, user$keymap_1, ALL); ~. ~. SHOW (KEY_MAP_LISTS);ww9;1 RETURN RETURNI Returns to the procedure that called the current procedure. (The returnJ is to the statement following the one that called the current procedure.)J RETURN is can be used in the ON_ERROR section of a procedure or to return" a value or status in a procedure. SUyntax: RETURN [value] ParametersK value Optionally, a value to be returned to the calling procedure,F such as a variable or a status value (1 for true; 0 for false). ExamplesJ 1. In the following procedure, RETURN is used in the ON_ERROR section ofA a procedure (in this case, to attach to the parent process):$ PROCEDURE user_attach_to_parent ON_ERROR# IF ERROR = TPU$_NOPARENT THENA V MESSAGE ("Not running DECTPU in a subprocess."); RETURN; ENDIF; ENDON_ERROR; ATTACH; ENDPROCEDURE;E 2. In the following procedure, RETURN passes a value to the callingI procedure (in this case, a keyword for a key pressed after the shift or GOLD key): PROCEDURE user_get_gold_keyD LOCAL gold_key; ! keyword for key pressed after GOLD" SET (SHIFT_KEY, LAST_KEY);3 gold_key := KEY_NAMEW (READ_KEY, SHIFT_KEY); RETURN (key_to_shift); ENDPROCEDURE;J 3. In the following procedure, RETURN passes a value (true or false) forH the status of a procedure (in this case, whether the user is at the end of a line): PROCEDURE user_at_eol ON_ERROR6 RETURN (1); ! Suppress warning message ENDON_ERROR;1 IF CURRENT_OFFSET = LENGTH (CURRENT_LINE) THEN4 RETURN (1); ! True -- at end of line X ELSE9 RETURN (0); ! False -- not at end of line ENDIF; ENDPROCEDURE;ww9;1 SAVE SAVEI Creates a section file -- a binary file containing all currently defined, procedures, variables, and key definitions. Syntax> SAVE (filespec [,"NO_DEBUG_NAMES"] [",NO_PROCEDURE_NAMES"]' [",IDENT", string] ) ParametersK filespec Specifies the section file you want to create. IfG Y you supply only the file name, DECTPU uses theK current (default) device and your current, defaultK directory. The default file type is .TPU$SECTION.I "NO_DEBUG_NAMES" Prevents DECTPU from writing procedure parameterK names or local variable names to the section file.I This reduces the size of the file, but should beJ used only if you do not plan to deb Zug the section file.H "NO_PROCEDURE_NAMES" Prevents DECTPU from writing procedure names toH the section file. This reduces the size of theI file, but should be used only if you do not planK to use the application created by the section fileK with the TRACEBACK or LINE_NUMBER functions set to ON.J "IDENT" Directs DECTPU to a[ssociate an identifying stringH (such as a version identifier) with the section file.J string Specifies the identifying string to be associated/ with the section file. Comments4 Section files contain the following in binary form: o All compiled procedures; o Names of all variables created (but NOT their contents)K o All key definitions binding a statement, procedure, program, or a le \arnH sequence to a key -- including comments added to the key definitionsK The default section file is SYS$SHARE:EVE$SECTION.TPU$SECTION, for the EVE editor. (See help on EVE.)H To invoke DECTPU with your section file, use the following DCL command:+ $ EDIT/TPU/SECTION=disk:[directory]fileF Use a complete file specification, including the disk (or device) andG directory; otherwise, DECTPU assumes the section file is in SYS$SHARE.K Alternatively, define the logical name TPU$ ]SECTION to specify your sectionK file. This is useful if you want to use that section file for all or mostC sessions. For more information, see DCL HELP on EDIT/TPU/SECTION. Example SAVE ("mysection");J Creates a section file called MYSECTION.TPU$SECTION in your your current,K default directory. The section file contains in binary form your compiledJ procedures, key definitions, and variables -- including any already saved- in the section file you are currently using.ww ^9;1 SCAN SCANK Returns a pattern matching the longest string that does not contain anyE of the characters in the specified string, range, or buffer. TheI pattern matches characters until it reaches the end of the line beingJ searched or until it finds one of the characters in the string, range,H or buffer used as a parameter. SCAN fails if it finds no charactersK other than those present in its argument. SCAN succeeds if it finds at= least one _character not specified in the first parameter. SyntaxG pattern := SCAN ({string | range | buffer} [, {FORWARD | REVERSE}]) ParametersF string A string containing the characters that causeK DECTPU to stop matching characters in the searched text.E range A range containing the characters that causeK DECTPU to stop matching characters in the searched ` text.F buffer A buffer containing the characters that causeK DECTPU to stop matching characters in the searched text.J FORWARD A keyword directing DECTPU to match characters in/ the forward direction.J REVERSE A keyword directing DECTPU to match characters asI follows: First, match characters in the forwardK a direction until DECTPU finds a character that is aI member of the set of characters in the specifiedG buffer, range, or string. Next, return to theD first character that SCAN matched and startK matching characters in the reverse direction untilJ DECTPU finds a character in the specified buffer,K range, or string. You can specify REVERSE only ifEb you are using SCAN in the first element of aH pattern being used in a reverse search. In allJ other contexts, specifying REVERSE has no effect.B The behavior enabled by REVERSE allows anI alternate form of reverse search. By default, aK reverse search stops as soon as a successful matchG occurs, even if there might have be cen a longerG successful match in the reverse direction. ByH specifying REVERSE with SCAN, you direct DECTPUJ not to stop matching in either direction until itD has matched as many characters as possible. Examples 1. pat1 := SCAN ('abc');I This assignment statement stores in "pat1" a pattern that matchesJ the longest string of characters that does not contain an a, bd, or c.& 2. pat1 := SCAN ('abc', FORWARD);@ This statement has exactly the same effect as Example 1.$ 3. word := SCAN (' ', REVERSE);F This statement defines the variable "word" to mean the longestF consecutive string of characters that does not include a space7 character. If you use the following statement:, the_range := SEARCH (word, REVERSE);F when the cursor is on the "n" in Xanadu in the following text:B e "In Xanadu did Kublai Khan a stately pleasure dome decree"J then the variable "the_range" contains the word "Xanadu". This isH because when you use SCAN with REVERSE as the first element of aD pattern, and then use that pattern in a reverse search, SCANF matches as many characters as possible in both the forward and reverse directions.J If the cursor is on "n" but you define the variable "word" without' the REVERSE keyword, like this:f word := SCAN (' ');I and then do a reverse search, "the_range" contains the characters "nadu". Related Topics@ ANCHOR ANY ARB MATCH NOTANY SCANL8 SEARCH SEARCH_QUIETLY SPAN SPANL UNANCHORww9;1 SCANL SCANLK Returns a pattern matching the longest string that does not contain anyH of the characters the specified string, range, or buffer. A pattern= created with SCANL can match tgext containing line breaks.I SCANL fails if it finds no characters other than those present in itsC argument. SCAN succeeds if it finds at least one character not% specified in the first parameter. SyntaxH pattern := SCANL ({string | range | buffer} [, {FORWARD | REVERSE}]) ParametersF string A string containing the characters that causeK DECTPU to stop matching characters in the searched text. hE range A range containing the characters that causeK DECTPU to stop matching characters in the searched text.F buffer A buffer containing the characters that causeK DECTPU to stop matching characters in the searched text.J FORWARD A keyword directing DECTPU to match characters in/ the forward direction.J REVEiRSE A keyword directing DECTPU to match characters asI follows: First, match characters in the forwardK direction until DECTPU finds a character that is aI member of the set of characters in the specifiedG buffer, range, or string. Next, return to theE first character that SCANL matched and startK matching characters and line breaks i jn the reverseH direction until DECTPU finds a character in theE specified buffer, range, or string. You canK specify REVERSE only if you are using SCANL in theK first element of a pattern being used in a reverseK search. In other contexts, specifying REVERSE has# no effect.B The behavior enabled by REVERSE allows anI k alternate form of reverse search. By default, aK reverse search stops as soon as a successful matchG occurs, even if there might have been a longerG successful match in the reverse direction. ByI specifying REVERSE with SCANL, you direct DECTPUJ not to stop matching in either direction until itD has matched as many characterls as possible. ExamplesK 1. The following assignment statement creates a pattern that matches aK sentence. It assumes that a sentence ends in a period, exclamationI mark, or question mark. It also assumes that a sentence containsD at least two letters. The matched text does not include the punctuation mark.F sentence_pattern := ANY ("ABCDEFGHIJKLMNOPQRSTUVWXYZ") + SCANL (".!?"); 2. pat1 := SCANL ('abc');I This amssignment statement stores in "pat1" a pattern that matchesJ the longest string of characters that does not contain an a, b, or c.' 3. pat1 := SCANL ('abc', FORWARD);@ This statement has exactly the same effect as Example 1.% 4. word := SCANL (' ', REVERSE);F This statement defines the variable "word" to mean the longestF consecutive string of characters that does not include a space7 character. If you use the following stateme nnt:, the_range := SEARCH (word, REVERSE);F when the cursor is on the "n" in Xanadu in the following text:B "In Xanadu did Kublai Khan a stately pleasure dome decree"J then the variable "the_range" contains the word "Xanadu". This isI because when you use SCANL with REVERSE as the first element of aE pattern, and then use that pattern in a reverse search, SCANLF matches as many characters as possible in both the forward and reoverse directions.J If the cursor is on "n" but you define the variable "word" without' the REVERSE keyword, like this: word := SCANL (' ');I and then do a reverse search, "the_range" contains the characters "nadu". Related Topics> ANCHOR ANY ARB MATCH NOTANY SCAN7 SEARCH SEARCH_QUIETLY SPAN SPANL UNANCHORww:;1 SCROLL SCROLLJ Scrolls text in the current buffer up or downp on the screen by the numberE of lines specified. The cursor stays at at the same relative screen location. Syntax- [integer1 :=] SCROLL (window [,integer2]) ParametersK window The window associated with the buffer whose text you want to scroll.I integer The number of lines you want the text to scroll. PositiveH values cause the text to scroll up (toward the top of theF screen). Negative values cause the text to q scroll downF (toward the bottom of the screen.) If you specify 0, no scrolling occurs. CommentsD The current character position will be different from the characterA position that was current before you issued the SCROLL built-in.G SCROLL optionally returns (integer1) the number and direction of linesC actually scrolled: A negative value indicates the number of linesK scrolled up; a positive value indicates the number of lines scrolled down.C (This vralue may be different from what you specified in integer2.)K If you omit integer2, the text is scrolled in the current direction of theH buffer until you press a key. Commands or procedures bound to that keyJ are executed. In forward direction, scrolling continues until the end ofH the buffer or a key press; in reverse direction, until the beginning of the buffer or a key press. Examples 1. SCROLL (main_window, +10); Scrolls text up 10 lines. 2. SET (FORWARD, my_busffer); SCROLL (my_window);I Scrolls up the text in MY_BUFFER (mapped to MY_WINDOW) until the end< of the buffer is reached or until you a key is pressed. Related topicsK SET(CROSS_WINDOW_BOUNDS) SET(FORWARD) SET(REVERSE) SET(SCROLLING)ww:;1 SEARCH SEARCHE Looks for the sequence of characters you specify and returns a range containing those characters. Syntax? [range := ] SEARCH ({string | pattern | keyword1} ,keyword2D t [{,keyword3 | ,integer} [,buffer | ,range]]) Parameters6 string The string you want to match.7 pattern The pattern you want to match.@ keyword1 One of the following keywords: ANCHOR,B LINE_BEGIN, LINE_END, PAGE_BREAK, REMAIN," UNANCHOR.7 keyword2 One of the following keywords:E FORWARD -- Specifies a search in the forwardu# direction.E REVERSE -- Specifies a search in the reverse# direction.7 keyword3 One of the following keywords:J EXACT -- Specifies the search must match case and9 diacritical information exactly.I NO_EXACT -- Makes the search insensitive to caseJ and diacritical marks. This keyword is optional.K v integer An integer specifying exactly what characteristicsF the SEARCH built-in is to match. Rather thanI specifying the integers directly, you should use= the following pre-defined constants:H TPU$K_SEARCH_CASE -- Specifies a search that isH sensitive to case but may not be insensitive to. diacritical markings.G w TPU$K_SEARCH_DIACRITICAL -- Specifies a searchJ that is sensitive to diacritical markings but may4 not be insensitive to case.F You can perform Boolean operations to combine7 these constants. For example:F tpu$k_search_diacritical OR tpu$k_search_caseH buffer The buffer in which to search. The search willJ start at th xe beginning of the buffer if a forwardF search, or the end of the buffer if a reverseK search. If the fourth parameter is not specified,K SEARCH operates on the current buffer, starting at2 the current editing pointG range The range in which to search. The search willI start at the beginning of the range if a forwardH search, o yr at the end of the range if a reverseK search. If the fourth parameter is not specified,? SEARCH operates on the current buffer. ExamplesK 1. The following statement causes DECTPU to search the current buffer forI the string 'Reflections of MONET'. If the search is successful, the> location of the matched characters is stored in the rangeG 'user_range'. The search would match the characters regardless of, their casze since NO_EXACT is specified.F user_range := SEARCH ("Reflections of MONET", FORWARD, NO_EXACT);I 2. The following procedure searches for the word 'CHAPTER' appearing atB the beginning of a line. If the word is found, the procedureF positions the cursor to the beginning of the word. Otherwise, it, places a message in the message buffer. PROCEDURE user_find_chap LOCAL chap, found_range; ON_ERROR' IF ERROR = TPU$_STRNOT{FOUND THEN2 MESSAGE ('CHAPTER not found. '); ELSE1 MESSAGE (MESSAGE_TEXT (ERROR)); ENDIF; ENDON_ERROR;' chap := LINE_BEGIN & 'CHAPTER';8 found_range := SEARCH (CHAP, FORWARD, NO_EXACT); IF found_range <> 0 THEN% POSITION (found_range); ENDIF; ENDPROCEDURE;ww:;1 SEARCH_QUIETLY SEARCH_QUIETLYJ Looks for the sequenc|e of characters that you specify and returns a rangeI containing those characters. Unlike the SEARCH built-in, SEARCH_QUIETLY/ does not signal an error if no match is found. SyntaxG [range := ] SEARCH_QUIETLY ({string | pattern | keyword1} ,keyword2K [{,keyword3 | ,integer} [,buffer | ,range]] Parameters6 string The string you want to match.7 pattern The pattern you want to match.@ keyword1 } One of the following keywords: ANCHOR,B LINE_BEGIN, LINE_END, PAGE_BREAK, REMAIN," UNANCHOR.7 keyword2 One of the following keywords:E FORWARD -- Specifies a search in the forward# direction.E REVERSE -- Specifies a search in the reverse# direction.7 keyword3 One of the following keywords:K ~ EXACT -- Specifies that the search must match case= and diacritical information exactly.I NO_EXACT -- Makes the search insensitive to caseJ and diacritical marks. This keyword is optional.K integer An integer specifying exactly what characteristicsF the SEARCH built-in is to match. Rather thanI specifying the integers directly, you should us e= the following pre-defined constants:H TPU$K_SEARCH_CASE -- Specifies a search that isH sensitive to case but may not be insensitive to. diacritical markings.G TPU$K_SEARCH_DIACRITICAL -- Specifies a searchJ that is sensitive to diacritical markings but may4 not be insensitive to case.F You can  perform Boolean operations to combine7 these constants. For example:F tpu$k_search_diacritical OR tpu$k_search_caseH buffer The buffer in which to search. The search willJ start at the beginning of the buffer if a forwardF search, or the end of the buffer if a reverseK search. If the fourth parameter is not specified,K SEARCH operates on the current buffer, starting at2 the current editing pointG range The range in which to search. The search willI start at the beginning of the range if a forwardH search, or at the end of the range if a reverseK search. If the fourth parameter is not specified,? SEARCH operates on the current buffer. ExamplesK 1. The following s tatement causes DECTPU to search the current buffer forI the string 'Reflections of MONET'. If the search is successful, the> location of the matched characters is stored in the rangeG 'user_range'. The search would match the characters regardless of, their case since NO_EXACT is specified.C user_range := SEARCH_QUIETLY ("Reflections of MONET", FORWARD, NO_EXACT);I 2. The following procedure searches for the word "Chapter" appearing atK the beginning of a line. If the word is found, the procedure puts theJ cursor at the beginning of the word. Otherwise, it puts a message in the message buffer. PROCEDURE user_find_chap LOCAL chap, found_range; ON_ERROR' IF error = TPU$_STRNOTFOUND THEN1 MESSAGE ("Chapter not found."); ELSE1 MESSAGE (MESSAGE_TEXT (error)); ENDIF; ENDON_ERROR;' chap := LINE_BEGIN & "Chapter";@ found_range := SEARCH_QUIETLY (chap, FORWARD, NO_EXACT); IF found_range <> 0 THEN% POSITION (found_range); ENDIF; ENDPROCEDURE;ww;:;1 SELECT SELECTK Returns a marker for the current character position in the current buffer,I and sets the video attribute for displaying the select region when it is visible on the screen. Syntax marker := SELECT (keyword) ParametersB keyword The video attribute for the character at the markedJ location: NONE, BLINK, BOLD, REVERSE, and UNDERLINE. ThisK attribute applies to all the characters in the select range. ExampleE The following procedure creates a bold marker for the beginning of aF select region; as you move the cursor, characters that you select are bolded: PROCEDURE user_start_select% begin_select := SELECT (BOLD);& MESSAGE ("Selection started.");9 ! To turn off the selection, set the variable to 0 ENDPROCEDURE; Related topics MARK SELECT_RANGEww;:;1 SELECT_RANGE SELECT_RANGED Returns a range containing all the characters between the markerB established with the SELECT built-in and the current characterJ position. SELECT_RANGE does not include the character at the position ending the range. Syntax range := SELECT_RANGE Comments+ To select text, do the following steps:K 1. Use the SELECT built-in to put a marker where you want to begin the! selection -- for example:* begin_select := SELECT (BOLD));+ 2. Move the cursor to select the text.G 3. When all of the text is selected, create a range containing the% selected text -- for example:$ selrange := SELECT_RANGE;K 4. To end the selection, set the marker for the beginning of the range to null -- for example: begin_select := 0; Examples! 1. select_1 := SELECT_RANGE;C Stores in the variable SELECT_1 the range for the currently selected characters.F 2. The following procedure shows how to create two select ranges: PROCEDURE user_select, begin_select := SELECT (REVERSE);* MESSAGE ("Selection started."); MOVE_VERTICAL (+5);% selrange1 := SELECT_RANGE; MOVE_VERTICAL (+5);% selrange2 := SELECT_RANGE;@ ! Stop the selection by setting the marker to null begin_select := 0; ENDPROCEDURE; Related topics MARK SELECTww;:;1 SEND SENDK Passes data to a specified subprocess. If you specify a buffer or a rangeJ as the data to pass to a subprocess, the lines of the buffer or range areI sent as separate records. The subprocess must have already been createdI with the CREATE_PROCESS built-in so that the output can be stored in theF buffer associated with the subprocess. (See help on CREATE_PROCESS.) Syntax- SEND ({buffer | range | string}, process) ParametersJ buffer A buffer whose contents you want to send to the subprocess.I range A range whose contents you want to send to the subprocess.; string A string you want to send to the subprocess.: process The process to which you want to send data. Comments Examples! 1. SEND (" DIRECTORY", Joyce_1);E Sends the DCL DIRECTORY command to the subprocess named Joyce_1.K 2. The following procedure uses SEND to pass a command to a subprocess inG which MAIL is running; the command to be sent to the subprocess is! obtained by using READ_LINE: PROCEDURE user_send_mail8 ! Create buffer and window for running a subprocess. grs := CREATE_BUFFER ("mail_buffer");* grs := CREATE_WINDOW (1, 22, ON);( ! Map the mail window to the screen UNMAP (MAIN_WINDOW);0 MAP (grs_mail_window, grs_mail_buffer);% ! Create a subprocess and send " MAIL" as first command4 subp1 := CREATE_PROCESS (grs_mail_buffer, " MAIL");3 ! Position to mail window and get next command$ POSITION (grs_mail_window);/ cmd1 := READ_LINE ("Mail_subp> ", 20); SEND (cmd1, subp1); ENDPROCEDURE; Related topics. ATTACH CREATE_PROCESS SEND_EOF SPAWNww;:;1 SEND_CLIENT_MESSAGE SEND_CLIENT_MESSAGE Syntax< SEND_CLIENT_MESSAGE ({STUFF_SELECTION | KILL_SELECTION}) Parameters? STUFF_SELECTION A keyword directing DECTPU to send theB STUFF_SELECTION client message to anotherH DECwindows application. This client message isI normally used to notify another application thatH it can read the secondary global selection from 0 the DECTPU application.F KILL_SELECTION A keyword directing DECTPU to send the clientE message KILL_SELECTION to another DECwindowsK application. This client message is normally usedF to notify another application that it can nowH delete the primary global selection because theF DECTPU application has copied that selection.ww;:; 1 SEND_EOF SEND_EOFJ Uses features of the VMS Mailbox Driver to send an end-of-file messageJ (IO$_WRITEOF) to a process or subprocess you specify. The end-of-fileH causes an outstanding read from a subprocess to be completed with an SS$_ENDOFFILE status. Syntax SEND_EOF (process) Examples SEND_EOF (Joyce_1);3 Sends an end-of-file to the subprocess Joyce_1. Related topics* ATTACH CREATE_PROCESS SEND SPAWNww;:;1 SET SETI Sets or changes attributes or features of an editing session, such asE margins, mode for entering text, scrolling, tab stops, and width. Syntax" SET (keyword, parameter[,...]) Parameters= keyword The attribute or feature being set or changed:E ACTIVE_AREA INPUT_FOCUS_GRAB RECORD_ATTRIBUTEB AUTO_REPEAT INPUT_FOCUS_UNGRAB RESIZE_ACTION< BELL INSERT R EVERSEA CLIENT_MESSAGE JOURNALING RIGHT_MARGINH COLUMN_MOVE_VERTICAL KEY_MAP_LIST RIGHT_MARGIN_ACTIONB CROSS_WINDOW_BOUNDS KEYSTROKE_RECOVERY SCREEN_LIMITSB DEBUG LEFT_MARGIN SCREEN_UPDATE? DEFAULT_DIRECTORY LEFT_MARGIN_ACTION SCROLL_BARJ DEFAULT_FILE LINE_NUMBER SCROLL_BAR_AUTO_THUMB> DETACHED_ACTION MAPPED_WHEN_MANAGED SCROLLING@ DISPLAY_VA LUE MARGINS SELF_INSERT> DRM_HEIRARCHY MAX_LINES SHIFT_KEYI ENABLE_RESIZE MENU_POSITION SPECIAL_ERROR_SYMBOL@ EOB_TEXT MESSAGE_ACTION_LEVEL STATUS_LINE< ERASE_UNMODIFIABLE MESSAGE_ACTION_TYPE SUCCESS; FACILITY_NAME MESSAGE_FLAGS SYSTEM> FIRST_INPUT_ACTION MODIFIABLE TAB_STOPS9 FORWARD MODIFIED TEXT: GLOBAL_SELECT MOUSE TIMER> GLOBAL_SELECT_GRAB MOVE_VERTICAL_CONTEXT TRACEBACK8 GLOBAL_SELECT_READ NO_WRITE UIDB GLOBAL_SELECT_TIME OUTPUT_FILE UNDEFINED_KEY: GLOBAL_SELECT_UNGRAB OVERSTRIKE VIDEO; HEIGHT PAD WIDGETD ICON_NAME PAD_OVERSTRUCK_TABS WIDGET_CALLBACKE ICON_PIXMAP PERMANENT WIDGET_CALL_DATAH ICONIFY_PIXMAP POST_KEY_PROCEDURE WIDGET_CONTEXT_HELPJ INFORMATIONAL PRE_KEY_PROCEDURE WIDGET_RESOURCE_TYPES: INPUT_FOCUS PROMPT_AREA WIDTHK parameter One or more parameters depending on the keyword you specify.C For more information, see help on the particular SET statement. Related topics! EXPAND_NAME GET_INFO SHOWwwb:;1 SET(ACTIVE_AREA) SET(ACT IVE_AREA)? Designates the specified area as the "active area" in a DECTPUE window. The active area is the region in the window in which DECTPU ignoresF movements of the pointer cursor for purposes of distinguishing clicks8 from drags. When the user presses down a mouse button,> DECTPU interprets the event as a click if the upstroke occurs+ in the same active area as the down click. If the upstroke> occurs outside the active area where the down click occurred,1 DECTPU interprets the event as a drag operation. Syntax; SET (ACTIVE_AREA, window, column, row [,width, height]) ParametersJ window The window in which you want to define the active area.I column An integer specifying the leftmost column of the% active area.E row An integer specifying the topmost row of the% active area.H If you use 0, the active area row is the status" line, andI you cannot designate an area height greater than 1.)J width an integer specifying the width in columns of the/ active area. Defaults to 1.)H height An integer specifying the height in rows of the/ active area. Defaults to 1.) ExampleG The following statement defines an active area two columns wide and* three rows high in the current window:A SET (ACTIVE_AREA, CURRENT_WINDOW, the_column, the_row, 2, 3);wwb:;1 SET(AUTO_REPEAT) SET(AUTO_REPEAT)I Enables or disables the repetition of keystrokes when you hold down a key. Syntax SET (AUTO_REPEAT, {OFF | ON} Parameters< OFF To require separate keystrokes for the characters.< ON To repeat the character until the key is released. Comments) Auto-repeat works on all keys except:: F1 through F5 BREAK CTRL and another key ESCAPE7 NO SCROLL RETURN SET-UP TAB ExampleH The following procedures shows how to turn auto repeat off and on to% slow cursor motion appropriately: PROCEDURE user_slow_arrow_up SET (AUTO_REPEAT, OFF); MOVE_VERTICAL (-1); SET (AUTO_REPEAT, ON); ENDPROCEDURE;" PROCEDURE user_slow_arrow_down SET (AUTO_REPEAT, OFF); MOVE_VERTICAL (+1); SET (AUTO_REPEAT, ON); ENDPROCEDURE;wwb:; 1 SET(BELL) SET(BELL)@ Enables or disables the terminal bell for messages (all or only broadcasts). Syntax- SET (BELL, {ALL | BROADCAST}, {OFF | ON}) Parameters@ ALL Specifies that ON or OFF applies to all messages.K BROADCAST Specifies that ON or OFF applies only to broadcast messages,* suc h as from MAIL or REPLY.? OFF Disables the bell for ALL or BROADCAST messages.> ON Enables the bell for ALL or BROADCAST messages. CommentsK A bell character (ASCII decimal 7) in message text does not cause the bellI to ring; DECTPU displays bell characters as uninterpreted control codes.J You can also use DCL commands to affect the display of broadcast messagesH within DECTPU. If you use the DCL command SET TERMINAL/NOBROADCAST, noK broadcast messages are sent to your terminal. Also, using the DCL command9 SET BROADCAST controls some kinds of broadcast messages. ExampleG The following procedure saves the existing bell state, turns it on forH messages, outputs a message with a bell, and then restores the previous bell state:) PROCEDURE user_ring_bell (msg_string) local bell_state;/ bell_state := GET_INFO (SYSTEM, "bell"); SET (BELL, ALL, ON); MESSAGE (msg_string); IF bell_state = 0 THEN" SET (BELL, ALL, OFF); ELSE& IF bell_state = BROADCAST THEN- SET (BELL, BROADCAST, ON); ENDIF; ENDIF; ENDPROCEDURE; Related topics% SET(INFORMATIONAL) SET(SUCCESS)wwb:;1 SET(CLIENT_MESSAGE) SET (CLIENT_MESSAGE)J Specifies the program or learn sequence DECTPU should execute whenever it? receives a client message from another DECwindows application.  Syntax< SET (CLIENT_MESSAGE, SCREEN [, {program_source | NONE}]) ParametersE SCREEN A keyword used for compatibility with future, versions of DECTPU.D program_source A string, buffer, range, learn sequence, orK program specifying the client message routine. IfJ you do not specify this parameter, DECTPU deletesH the current client message routine; thereafter,E your application is not informed when DECTPUC receives a client message from DECwindows.K NONE A keyword instructing DECTPU to delete the current0 client message routine.wwb:;1 SET(COLUMN_MOVE_VERTICAL) SET(COLUMN_MOVE_VERTICAL)E Determines the behavior of the cursor when you use the MOVE_VERTICAL built-in. Syntax* SET (COLUMN_MOVE_VERTICAL, {OFF | ON})  ParametersG OFF The cursor will stay at the same offset in each new record toE which the cursor moves. This is the default. Since DECTPUH counts a tab as one character when determining the offset, theH cursor's column location can change dramatically after you use MOVE_VERTICAL.I ON The cursor will move in approximately the same column from lineJ to line, unless doing so would put the cursor in the middle of a( tab or beyond the end of line. ExampleF In the following example, the symbol "TAB..." represents a tab, and aK caret (^) indicates the character that the cursor is on. Suppose you haveH the following text in a buffer, with the cursor on the "c" character on the first line: abcdefg ^ aTAB....bcdefg If you use the following code:$ SET (COLUMN_MOVE_VERTICAL, OFF); MOVE_VERTICAL (1);H The cursor ends up pointing to the "b" character on the second line, as follows: abcdefg aTAB....bcdefg ^ If you use the following code:# SET (COLUMN_MOVE_VERTICAL, ON); MOVE_VERTICAL (1);F The cursor ends up pointing to the beginning of the tab on the second line, as follows: abcdefg ^ aTAB....bcdefg Related Topics MOVE_VERTICALww:;1 SET(CROSS_WINDOW_BOUNDS) SET(CROSS_WINDOW_BOUNDS)> Determines the effect of CURSOR_VERTICAL on the cursor. WhenI CROSS_WINDOW_BOUNDS is set to ON, the CURSOR_VERTICAL built-in may cause? the cursor to pass over window boundaries on the screen. WhenK CROSS_WINDOW_BOUNDS is set to OFF, the CURSOR_VERTICAL built-in causes theE cursor to move only within one window and to obey scrolling regions. Syntax) SET (CROSS_WINDOW_BOUNDS, {OFF | ON}) ParametersJ OFF Causes the CURSOR_VERTICAL built-in to move the cursor only! within one window.J ON  Allows the CURSOR_VERTICAL built-in to move the cursor over? window boundaries. This is the default setting. Example# SET (CROSS_WINDOW_BOUNDS, OFF);H Prevents the CURSOR_VERTICAL built-in from moving the cursor out of theI current window. Instead, text in the window scrolls if the cursor moves into a scrolling region. Related Topics CURSOR_VERTICALww:; 1 SET(DEBUG) SET(DEBUG)K Controls the behavior of a debugger program. Using SET(DEBUG), you canI select a user-written debugger, set and clear breakpoints, enable andA disable single-step execution, and deposit values into global/ variables, local variables, and parameters. SyntaxP SET (DEBUG [, keyword1] [,string1 | ,range | ,buffer | ,program | keyword2])+ OR SET (DEBUG, string2, value) ParametersE keyword1 The valid keywords are ON, OFF, and PROGRAM.A  ON - Causes a debugger to do single-stepJ debugging. Each time the line number in a DECTPUB program changes, the debugger is invoked.K OFF - disables single-step debugging. This is the' default value.I PROGRAM - indicates that a user-written debugger. program will be used.I string1 A string or an expression evaluating to a stringH that is the name of a program. If you use this- built-in in the formK SET (DEBUG, ON, 'procedure_name'), the debugger isI invoked each time the procedure 'procedure_name'I is called. If you use this built-in in the formI SET (DEBUG, OFF, 'procedure_name'), the debuggerD removes the breakpoint that was set for theD procedure 'procedure_name'. If you use the- built-in in the formD SET (DEBUG, PROGRAM, 'procedure_name'), theI user-written debugger called 'procedure_name' isC designated as the debugger for the current+ debugging session.I range An expression evaluating to a range containing aK program or procedure. If you use this built-in inD the form SET (DEBUG, ON, 'range_name'), theD debugger is invoked each time the procedureJ 'range_name' is called. If you use this built-inH in the form SET (DEBUG, OFF, 'range_name'), theI debugger removes the breakpoint that was set forD the procedure 'range_name'. If you use the-  built-in in the form@ SET (DEBUG, PROGRAM, 'range_name'), theE user-written debugger called 'range_name' isC designated as the debugger for the current+ debugging session.J buffer An expression evaluating to a buffer containing aK program or procedure. If you use this built-in inE the form SET (DEBUG, ON, 'buffer_name'), theD debugger is invoked each time the procedureK 'buffer_name' is called. If you use this built-inI in the form SET (DEBUG, OFF, 'buffer_name'), theI debugger removes the breakpoint that was set forE the procedure 'buffer_name'. If you use the- built-in in the formA SET (DEBUG, PROGRAM, 'buffer_name'), theF  user-written debugger called 'buffer_name' isC designated as the debugger for the current+ debugging session.K program An expression evaluating to a program. If you use2 this built-in in the formI SET (DEBUG, ON, 'program_name'), the debugger isH invoked each time the program 'program_name' isF called. If you use this built-in in the formG SET (DEBUG, OFF, 'program_name'), the debuggerD removes the breakpoint that was set for theI program 'program_name'. If you use the built-inJ in the form SET (DEBUG, PROGRAM, 'program_name'),K the user-written debugger called 'program_name' isC designated as the debugger for the current+ debugging ses sion.I keyword2 The only valid keyword is ALL. You can only useI this keyword if you used OFF in place of keywordK 1. The statement SET (DEBUG, OFF, ALL) clears all3 procedures of breakpoints.I string2 An expression evaluating to a string that is the9 name of a variable or parameter.J value A value of any data type in DECTPU. You can on lyI use this parameter if you specified a string2 as< the first parameter. The statementG SET (DEBUG, string2, value) deposits the valueE into the global variable, local variable, or4 parameter named by string2.ww:;1 SET(DEFAULT_DIRECTORY) SET(DEFAULT_DIRECTORY)G Determines the directory that will be used as your current, default director^SET(AUTO_REPEAT) SET(BELL)*SET(CLIENT_MESSAGE) SET(COLUMN_MOVE_VERTICAL)SET(CROSS_WINDOW_BOUNDS) SET(DEBUG)`SET(DEFAULT_DIRECTORY)SET(DEFAULT_FILE)TSET(DETACHED_ACTION)SET(DISPLAY_VALUE)ZSET(DRM_HIERARCHY)0SET(ENABLE_RESIZE) SET(EOB_TEXT)SET(ERASE_UNMODIFIABLE)bSET(FACILITY_NAME)SET(FIRST_INPUT_ACTION)( SET(FORWARD)SET(GLOBAL_SELECT)dSET(UID) TPUy. SyntaxG [old_default_string :=] SET (DEFAULT_DIRECTORY, new_default_string) ParametersF DEFAULT_DIRECTORY A keyword indicating that the SET built-in isI being used to control which directory is used as9 your current, default directory.J new_default_string A quoted string naming the directory to which you2 want the default changed.F old_default_string Optionally, the string naming t he old default# directory. CommentsK Note that when exit from DECTPU, your current, default directory is notA restored to the default that was set when you invoked DECTPU.F Note, too, that if you issue the EVE command DCL SHOW DEFAULT, theH directory shown is not always the new default directory, even thoughG the setting has actually been changed. To update DCL's tracking ofH your current, default directory, you can use the EVE command DCL SET DEFAULT.H If you specify a logical name that is a search list, DECTPU will setH your current, default directory to the first directory in the search list. Example> prev_dir := SET (DEFAULT_DIRECTORY, "DISK1:[WALSH.PINK]");J This statement sets your current, default directory to [WALSH.PINK] onI the device DISK1. The variable "prev_dir" contains the string naming# the previous default directory. Related Topics GET_INFO(SYSTEM)ww:;1 SET(DEFAULT_FILE) SET(DEFAULT_FILE)K Designates the file specification of the X resource file to be merged into the display's database. Syntax SET (DEFAULT_FILE, string) ParametersF DEFAULT_FILE A keyword indicating that you want to merge a new XJ resource file into the display's database. The currentH database, merged during editor initialization or by a8 previous SET (DEFAULT_FILE), is lost.A string The name of the X resource file specification.ww:;1 SET(DETACHED_ACTION) SET(DETACHED_ACTION)E Specifies the code to be executed when the DECTPU main input loopK detects that the current cursor position is detached (that is, that theH cursor position cannot accurately represent the editing point in the current window). Syntax? SET (DETACHED_ACTION, SCREEN [, {buffer | learn | program |5  range | string}] ParametersF DETACHED_ACTION A keyword indicating that the SET built-in isK being used to designate the detached cursor action! routine.F SCREEN A keyword indicating that the detached actionI routine is being set for all buffers and windows1 used during the session.I buffer The buffer containing the detached cursor action ! routine.C learn The learn sequence that is executed as the8 detached cursor action routine.J program The program containing the detached cursor action! routine.H range The range containing the detached cursor action! routine.I string The string containing the detached cursor action! routine. Comments; If you do not specify the optional third parameter, SETB (DETACHED_ACTION) deletes the current detached action routine.G To fetch the current detached action routine, use GET_INFO (SCREEN,H "detached_action"). To find out which of the five possible detachedF states the cursor is in, use GET_INFO (SCREEN, "detached_reason"). ExampleG The following procedure is a simple detached cursor action routine: PROCEDURE detached_routine LOCAL rightmost_column, the_offset;I rightmost_column := GET_INFO (CURRENT_WINDOW, "right", VISIBLE_TEXT);= the_offset := GET_INFO (CURRENT_BUFFER, "offset_column");$ IF the_offset > rightmost_columnE THEN SHIFT (CURRENT_WINDOW, the_offset - rightmost_column + 2) ENDIF; UPDATE (CURRENT_WINDOW); ENDPROCEDURE;B Given this definition of the procedure "detached_routine", theE following statement designates this procedure as an application's detached action routine:6 SET (DETACHED_ACTION, SCREEN, "detached_routine"); Related Topic GET_INFO(SCREEN)ww:;1 SET(DISPLAY_VALUE) SET(DISPLAY_VALUE)K Sets the display value of the specified window. DECTPU uses a window'sE display value, which is an integer value, to determine if a givenH record in a buffer should be made visible in a given window. If theC record's display value is greater than or equal to the window'sG setting, DECTPU makes the record visible in that window; otherwise,H DECTPU makes the record invisible. To set a record's display value,, use the SET (RECORD_ATTRIBUTE) built-in. Syntax6 SET (DISPLAY_VALUE, window, display_value_integer) ParametersI DISPLAY_VALUE A keyword indicating that the SET built-in isE being used to set the display value for a# window.K window The window whose display value you want to set.9 display_value_integer An integer from -127 to +127. ExampleK The following statement gives the current window a display value of 10.E This means that any record whose display value is less than 10 is& invisible in the specified window., SET (DISPLAY_VALUE, CURRENT_WINDOW, 10); Related Topics@ GET_INFO(BUFFER_VARIABLE) GET_INFO(MARKER_VARIABLE)> GET_INFO(WINDOW_VARIABLE) SET(ERASE_UNMODIFIABLE)6 SET(LEFT_MARGIN) SET(MODIFIABLE) SET(RECORD_ATTRIBUTE)ww:;1 SET(DRM_HIERARCHY) SET (DRM_HIERARCHY)G Sets the User Interface Definition (UID) file or files to be used withE DECTPU. A UID file contains widget definitions that are used by the Resource Manager. See help on SET (UID).ww:; 1 SET(UID) SET (UID)G Sets the User Interface Definition (UID) file or files to be used withE DECTPU. A UID file contains widget definitions that are used by the Resource Manager. Syntax& SET (UID, filespec, [filespec...]) ParameterK filespec A string that is the name of a UID file to be usedI with DECTPU. You must specify at least one fileE name, and you may specify more than one. NoE default file specification is applied to the, string you specify. ExampleJ The following statement designates the User Interface Definition (UID)K file MYNODE$DUA0:[SMITH]EXAMPLE.UID as a file to be used with DECTPU to5 create widgets needed by the layered application:" example_hierarchy := SET (UID,@ "mynode$dua0:[smith]example.uid");ww:;1 SET(ENABLE_RESIZE) SET(ENABLE_RESIZE)B Enables or disables resizing of the DECTPU screen. If the secondG parameter is the keyword ON, DECTPU gives DECwindows hints (parametersJ that DECwindows is free to use or ignore) about the allowable maximum andC minimum sizes for the DECTPU screen. The hints are set by the SETK (SCREEN_LIMITS,...) built-in. If the second parameter is the keyword OFF,E DECTPU uses the screen's current width and length as the maximum and minimum size. Syntax# SET (ENABLE_RESIZE, {OFF | ON}) ParametersG OFF A keyword that disables DECTPU's screen resize! support.F ON  A keyword that enables DECTPU's screen resize! support. Example4 The following statement enables screen resizing: SET (ENABLE_RESIZE, ON);ww:;1 SET(EOB_TEXT) SET(EOB_TEXT)I Sets or changes the text displayed at the end of a buffer. This textB is only a visual marker and is not written to the output file. Syntax" SET (EOB_TEXT, buffer, string) ParametersK buffer The buffer for which you are setting the end-of-buffer text.F string The text to be displayed. The default string is [EOB]. Example= SET (EOB_TEXT, main_buffer, "");4 Sets the end-of-buffer text for the main buffer.ww:;1 SET(ERASE_UNMODIFIABLE) SET(ERASE_UNMODIFIABLE)F Controls whether DECTPU erases unmodifiable records in response toG built-ins that delete lines from a buffer. For example, ERASE_LINEK only deletes an unmodifiable  record if ERASE_UNMODIFIABLE is turned on.D If ERASE_UNMODIFIABLE is turned off when ERASE_LINE or a similarG built-in encounters an unmodifiable record, the built-in returns an) error and does not delete the record.C SET (ERASE_UNMODIFIABLE) optionally returns an integer (0 or 1)J indicating whether ERASE_UNMODIFIABLE was turned on before the currentF call was executed. This makes it easier to return to the previous! setting later in the program. Syntax@  [previous_erase_setting] := SET (ERASE_UNMODIFIABLE, buffer,0 {ON | OFF}) ParametersI ERASE_UNMODIFIABLE A keyword indicating that the SET built-in isF being used to control whether unmodifiableH records are deleted in response to built-ins9 that erase lines in a buffer.G buffer The buffer for which you want to turn on orE  turn off erasing of unmodifiable records.D ON Enables erasing of unmodifiable records.E OFF Disables erasing of unmodifiable records.B previous_erase_setting An integer (1 or 0) indicating whetherG ERASE_UNMODIFIABLE was turned on before the6 current call was executed. ExampleH The following statement turns off erasing of unmodifiable records in: the current buffer and returns the previous setting of ERASE_UNMODIFIABLE:A old_setting := SET (ERASE_UNMODIFIABLE, CURRENT_BUFFER, OFF); Related Topics@ GET_INFO(BUFFER_VARIABLE) GET_INFO(MARKER_VARIABLE)9 GET_INFO(WINDOW_VARIABLE) SET(DISPLAY_VALUE)6 SET(RECORD_ATTRIBUTE) SET(MODIFIABLE)ww:;1 SET(FACILITY_NAME) SET(FACILITY_NAME)D Sets or changes the facility name -- the first item in a messageE generated by DECTPU. This built-in is valid only on VMS systems. Syntax SET (FACILITY_NAME, string) ParametersK string The facility name you want for messages -- such as, the nameJ of the application you are creating. The maximum length isK 10 characters. The facility name appears in messages if youC have used the SET (MESSAGE_FLAGS) built-in to eitherK explicitly include the facility name in messages, or includeG  the facility name only if enabled by the default message* flags for your VMS process. Example$ SET (FACILITY_NAME, "myeditor");G Sets the facility name so that status messages begin with MYEDITOR.ww:;1 SET(FIRST_INPUT_ACTION) SET (FIRST_INPUT_ACTION)J Specifies the program or learn sequence DECTPU should execute whenever it4 gets the first key or button event from DECwindows. Syntax5 SET (FIRST_INPUT_ACTION, {program_source  | NONE}) ParametersD program_source A string, buffer, range, learn sequence, orI program specifying the first input routine. TheI routine could be used, for example, to remove anK initial copyright notice when the user presses theE first key or mouse button. The keyword NONEA deletes the current first input routine;J thereafter,  your application is not informed whenK DECTPU receives the first key or button event fromJ DECwindows. Use of this built-in after the firstJ key or button event is received will cause DECTPUE to signal an error as it should be used only> before the first key or button event.K NONE A keyword instructing DECTPU to delete the current-  first input routine.ww':;1 SET(FORWARD) SET(FORWARD)I Sets or changes the direction of the specified buffer to forward (toward3 the right and down). This is the default setting. Syntax SET (FORWARD, buffer) Example" SET (FORWARD, CURRENT_BUFFER);F Sets the direction for the current buffer to forward for searches and movement. Related topics* SCROLL SET(REVERSE) SET(SCROLLING)ww':;1 SET(GLOBAL_SELECT) SET (GLOBAL_SELECT)E Causes DECTPU to request ownership of the specified global selectionG property. An optional fourth parameter allows the application to also relinquish a global selection. SyntaxB [integer := ] SET (GLOBAL_SELECT, SCREEN, {PRIMARY | SECONDARY' | selection_name}E [, {GLOBAL_SELECT_GRAB | GLOBAL_SELECT_UNGRAB]) ParametersI integer Indicates whether the global selection ownershipA  request was granted. 1 if successful, 0# otherwise.J PRIMARY A keyword indicating that the layered applicationF is requesting ownership of the PRIMARY global# selection.J SECONDARY A keyword indicating that the layered applicationE is requesting is requesting ownership of the4 SECONDARY global selection.K selection_na me A string identifying the global selection that theK layered application wants to own. You specify theB selection name as a string if the layeredK application is requesting ownership of a selectionC other than the PRIMARY or SECONDARY global# selection.G GLOBAL_SELECT_GRAB DECTPU to grab the selection specified in theI second parameter. This is the default if you do: not specify the fourth parameter.C GLOBAL_SELECT_UNGRAB A keyword telling DECTPU to relinquish theE selection specified in the second parameter.ww':;1 SET(GLOBAL_SELECT_GRAB) SET (GLOBAL_SELECT_GRAB)J Specifies the program or learn sequence DECTPU should execute whenever it8 automatically grabs ownership of the PRIMARY selection. Syntax@ SET (GLOBAL_SELECT_GRAB, S CREEN [, {program_source | NONE}]) ParametersE SCREEN A keyword used for compatibility with future, versions of DECTPU.D program_source A string, buffer, range, learn sequence, orJ program specifying the grab procedure. If you doG not specify this parameter, DECTPU deletes theK current global selection grab routine; thereafter,K your application is not informed when DECTPU grabs6 the PRIMARY global selection.K NONE A keyword instructing DECTPU to delete the current7 global selection grab routine.ww':;1 SET(GLOBAL_SELECT_READ) SET (GLOBAL_SELECT_READ)J Specifies the program or learn sequence DECTPU should execute whenever itB receives a Selection Request event on a global selection it owns. SyntaxK SET (GLOBAL_SELECT_REAebSET(FACILITY_NAME)SET(FIRST_INPUT_ACTION)( SET(FORWARD)SET(GLOBAL_SELECT)SET(GLOBAL_SELECT_GRAB)SET(GLOBAL_SELECT_READ)fSET(GLOBAL_SELECT_TIME)SET(GLOBAL_SELECT_UNGRAB) SET(HEIGHT)SET(ICONIFY_PIXMAP)vSET(ICON_NAME)SET(ICON_PIXMAP)zSET(INFORMATIONAL) SET(INPUT_FOCUS)SET(INPUT_FOCUS_GRAB)dSET(INPUT_FOCUS_UNGRAB)R SET(INSERT)JSET(JOURNALING)dSET(UID) TPU D, {SCREEN | buffer} [, {program_source | NONE}]) ParametersD SCREEN A keyword indicating that the application'sG default global selection read routine is to be set.H buffer The buffer with which the global selection read5 routine is to be associated.D program_source A string, buffer, range, learn sequence, orE program specifying the global selection readJ procedure. If you do not specify this parameter,I DECTPU deletes the current global selection read# procedure.K NONE A keyword instructing DECTPU to delete the current9 global selection read procedure.ww':;1 SET(GLOBAL_SELECT_TIME) SET(GLOBAL_SELECT_TIME)K Specifies how long DECTPU should wait before it assumes that a request forJ information about a global selection will not be satisfied. You can onlyI specify the number of seconds as delta time. The maximum delta time you can set is 24 days, 20 hours. Syntax8 SET (GLOBAL_SELECT_TIME, SCREEN, {integer | string}) ParametersK GLOBAL_SELECT_TIME Keyword indicating that you want to set the global+ selection timeout.I SCREEN Keyword used to preserve consistency with future, versions of DECTPU.G integer The number of seconds to wait. The default is& five seconds.- string A delta time string.ww':;1 SET(GLOBAL_SELECT_UNGRAB) SET (GLOBAL_SELECT_UNGRAB)J Specifies the program or learn sequence DECTPU should execute whenever it' loses ownership of a global selection. SyntaxB SET (GLOBAL_SELECT_UNGRAB, SCREEN [, {program_source | NONE}]) ParametersE SCREEN  A keyword used for compatibility with future, versions of DECTPU.D program_source A string, buffer, range, learn sequence, orI program specifying the ungrab procedure. If youJ do not specify this parameter, DECTPU deletes theA current global selection ungrab routine;J thereafter, your application is not informed whenF DECTPU loses ownership of a global selection.K NONE A keyword instructing DECTPU to delete the current9 global selection ungrab routine.ww':; 1 SET(HEIGHT) SET(HEIGHT)J Sets the height of the screen without modifying the height or location of any DECTPU window. Syntax! SET (HEIGHT, SCREEN, integer) ParametersI HEIGHT A keyword indicating that the vertical dimension& is being set.F SCREEN A keyword indicating that the screen is being! resized.I integer The number of lines the screen should have. The9 value must be between 1 and 255. CommentsJ Note that although SET (HEIGHT) does not alter any DECTPU windows, theD default EVE behavior when the screen is made smaller is to unmapE windows from the screen, starting with the bottom-most window andG working upward, until there is room in the screen for the remainingE windows. If the screen is subsequently made larger, the unmapped( windows are not remapped by default. Example SET (HEIGHT, SCREEN, 20);3 Causes the screen to have a height of 20 lines. Related Topics< ADJUST_WINDOW GET_INFO(WINDOW_VARIABLE) SET(WIDTH)ww':;1 SET(ICON_NAME) SET(ICON_NAME)J Designates the string to be used as the layered application's name in the DECwindows icon box. Syntax SET (ICON_NAME, string) ParametersK ICON_NAME A keyword indicating that you want to set the icon name.A string The string you want to appear in the icon box.ww7:;1 SET(ICON_PIXMAP) SET(ICON_PIXMAP)F Determines the pixmap the application uses to create icons for the DECwindows environment. Syntax" Choose either of two variants:= [0 | 1 :=] SET (ICON_PIXMAP, integer, string1 [,widget]) or3 [0 | 1 :=] SET (ICON_PIXMAP, string2 [,widget]) ParametersK integer The hierarchy identifier returned by the SET (UID)D built-in. This identifier is passed to theG Resource Manager, which uses the identifier toK find the hierarchy's resource name in the resource" database.J string1 A case-sensitive string tha t is the name assignedF to the icon in the UIL file defining the iconK pixmap. The icon must be declared EXPORTED in the" UIL file.F The icon name must match the root name of theJ three icon names in the UIL file. The icon namesH specify the small, medium, and large size iconsJ supported by the Motif window manager. The namesK start with the root name, and end with a dimensionA "_nXn". For example, EVE's root name isG "EVE_ICON". The three icon names in EVE's UIL> file are therefore, "EVE_ICON_32X32",K "EVE_ICON_50X50", and "EVE_ICON_75X75". Note thatJ if you use a window manager that does not supportK multiple icon sized, you need to specif y the exact; name of the icon in your UIL file.F string2 The file specification of a bitmap file. SETH (ICON_PIXMAP) requires these files to be in the; format created by the Xlib routineE XWriteBitmapFile. To create a file with the@ correct format, you can use the program@ SYS$SYSTEM:DECW$PAINT.EXE (the DECpaint4  application) or the programH DECW$EXAMPLES:BITMAP.EXE. If you use DECpaint,I use the Customize Picture Size option to set theK picture size to non-standard. Use the Zoom optionH to manipulate this small image. Choose the X117 format when you save the file.H Set the height and width to 75 pixels for largeE icons, 50 pixels for medium icons, and to 320 pixels for small icons.G widget The widget whose icon pixmap is to be set. ByD default, DECTPU sets the icon pixmap of its* top-level widget. CommentsI To specify an icon pixmap defined in a UIL file, use the first syntaxI variant shown in the Syntax section. To specify an icon created in aK bitmap file, use the second syntax variant shown in the Syntax section.J DECTPU automatically selects the application's largest icon allowed byK the Motif Window Manager. DECTPU does this when the user executes thisF built-in, or changes the window manager icon size and restarts the window manager.I DECTPU returns a true value if it is successful in creating the icon; otherwise a false value. ExampleE The following statement causes the icon pixmap stored in the file@ ICON_FLAMINGO.X11 to be displayed in the application's icon:7 SET (ICON_PIXMAP, "DISK1:[SMITH]ICON_FLAMINGO.X11") Related Topics, SET(ICON_NAME) SET(ICONIFY_PIXMAP)ww7:;1 SET(ICONIFY_PIXMAP) SET(ICONIFY_PIXMAP)B This built-in is obsolete as DECTPU no longer supports the XUI DECwindows interface. Related Topics SET(ICON_PIXMAP)ww7:;1 SET(INFORMATIONAL) SET(INFORMATIONAL); Specifies whether informational messages are displayed. Syntax# SET (INFORMATIONAL, {OFF | ON}) Parameters5 OFF Disables display of informational messages.4 ON Enables display of informational messages. CommentsI If you invoke DECTPU using a section file, informational messages mayJ not be displayed. If you invoke DECTPU using /NOSECTION (such as whenH creating a new application), informational messages are displayed by default. Related topics1 SET(BELL) SET(FACILITY_NAME) SET(SUCCESS)ww7:;1 SET(INPUT_FOCUS) SET (INPUT_FOCUS)* Causes DECTPU to request the input focus. Syntax) SET (INPUT_FOCUS [, SCREEN | widget]) ParametersG SCREEN A keyword indicating that the top-level widgetG associated with DECTPU is to receive the input> focus. The default if not specified.K widget The widget that is to receive the input focus. IfI you do not specify this second parameter, DECTPUG requests input focus for the top-level widget.ww7:;1 SET(INPUT_FOCUS_GRAB) SET (INPUT_FOCUS_GRAB)J Specifies the program or learn sequence DECTPU should execute whenever it+ processes a FocusIn event from DECwindows. Syntax> SET (INPUT_FOCUS_GRAB, SCREEN [, {program_source | NONE}]) ParametersE SCREEN A keyword used for compatibility with future,  versions of DECTPU.D program_source A string, buffer, range, learn sequence, orH program specifying the input focus routine. IfJ you do not specify this parameter, DECTPU deletesJ the current input focus routine; thereafter, yourJ application is not informed when DECTPU processes9 a FocusIn event from DECwindows.K NONE A keyword instructing DECTPU to delete the current- input focus routine.ww7:;1 SET(INPUT_FOCUS_UNGRAB) SET (INPUT_FOCUS_UNGRAB)J Specifies the program or learn sequence DECTPU should execute whenever it, processes a FocusOut event from DECwindows. Syntax@ SET (INPUT_FOCUS_UNGRAB, SCREEN [, {program_source | NONE}]) ParametersE SCREEN A keyword used for compatibility with future, versions of DECTP U.D program_source A string, buffer, range, learn sequence, orJ program specifying the ungrab routine. If you doG not specify this parameter, DECTPU deletes theH current input focus ungrab routine; thereafter,E your application is not informed when DECTPUD processes a FocusOut event from DECwindows.K NONE A keyword instructing DECTPU to delete the current4 input focus ungrab routine.ww7:; 1 SET(INSERT) SET(INSERT)F Sets or changes the mode for entering text in the specified buffer toI insert. New characters appear in front of the current position, pushing@ existing characters to the right. This is the default setting. Syntax SET (INSERT, buffer) Example! SET (INSERT, CURRENT_BUFFER);A Sets the mode for entering text in the current buffer to insert. Related topics+ COPY_TEXT MOVE_TEXT SET(OVERSTRIKE)ww7:;1 SET(JOURNALING) SET(JOURNALING)C Performs either of two functions depending on the variant used.K One variant specifies how frequently records are written to the journalC file. This variant can be used regardless of whether keystroke9 journaling or buffer change journaling is being used.H The other variant turns on or turns off buffer-change journaling and. allows you to specify a journal file name. Syntax SET (JOURNALING, integer) or< SET (JOURNALING, buffer, {ON | OFF} [,file_name_string]) ParametersJ JOURNALING A keyword indicating that the SET built-in is beingG used to enable, disable, or set the frequency of" journaling.H integer A number from 1 through 10. The lower the value,G the more frequently records are written to disk .? buffer The buffer for which you want to turn on0 buffer-change journaling.E ON A keyword turning on buffer-change journaling.F OFF A keyword turning off buffer-change journaling.H file_name_string The string naming the file you want to use as theJ buffer's journal file. If the file does not exist,K DECTPU automatically creates it. You cannot specifyK  this parameter if you have specified the keyword OFFJ for the third parameter. If you do not specify anyD file name when you turn journaling on, DECTPUH creates a journal file for you and names the file: using the default naming algorithm. CommentsH If you are using the variant that sets journaling frequency, a valueF of 1 causes a record to be written for approximately every 10 keysI pressed; a value of 10, for every 125 keys. If you are entering onlyI text (rather than procedures bound to keys), the number of keystrokes$ included in a record is greater:J o For a value of 1, a record is written for approximately every 30 to 35 keystrokes.I o For a value of 10, a record is written for approximately every 400 keystrokes. ExamplesI 1. SET (JOURNALING, CURRENT_BUFFER, ON, "disk1:[reinig]journal.jnl")D Turns on buffer-change journaling for the current buffer andC directs DECTPU to use the file JOURNAL.JNL in the directory% [REINIG] as the journal file. 2. SET (JOURNALING, 1);I Specifies that journaling records are to be written as frequentlyF as possible. Thus, if the editing session is interrupted by aC system failure, such as a communications break between yourG terminal and the computer, you are less likely to have lost any keystrokes. 3. SET (JOURNALING, 10);K Specifies that journaling records are to be written as infrequentlyE as possible. This may improve performance, depending on yourA system configuration, but it increases the risk that someF keystrokes will be lost if you have to use the journal file to2 recover your edits after a system failure. Related topics; CREATE_BUFFER GET_INFO(BUFFER_VARIABLE)2 GET_INFO(STRING_VARIABLE) GET_INFO(SYSTEM). JOURNAL_CLOSE JOURNAL_OPEN RECOVER_BUFFERwwG&;;1 SET(KEY_MAP_LIST) SET(KEY_MAP_LIST)" Binds a key-map list to a buffer. Syntax( SET (KEY_MAP_LIST, string, [buffer]) Parameters* string Specifies the key-map list.E buffer The buffer to which you want to bind the key-map list. Example: SET (KEY_MAP_LIST, "my_key_map_list", CURRENT_BUFFER);E Binds the key-map list called MY_KEY_MAP_LIST to the current buffer. Related topics( CREATE_KEY_MAP_LIST REMOVE_KEY_MAPwwG&;;1 SET(KEYSTROKE_RECOVERY) SET(KEYSTROKE_RECOVERY)J Controls whether DECTPU interprets the /RECOVER qualifier to mean thatH the application must execute a JOURNAL_OPEN statement. When you useE SET (KEYSTROKE_RECOVERY, OFF), DECTPU allows a program to proceedI without error, even if /RECOVER was specified at startup time and the= program executes no corresponding JOURdSET(INPUT_FOCUS_GRAB)dSET(INPUT_FOCUS_UNGRAB)R SET(INSERT)JSET(JOURNALING)`SET(KEYSTROKE_RECOVERY)^SET(KEY_MAP_LIST)hSET(LEFT_MARGIN)jSET(LEFT_MARGIN_ACTION)`SET(LINE_NUMBER)lSET(MAPPED_WHEN_MANAGED) SET(MARGINS)SET(MAX_LINES)SET(MENU_POSITION)SET(MESSAGE_ACTION_LEVEL) SET(MESSAGE_ACTION_TYPE)SET(MESSAGE_FLAGS)VSET(MODIFIABLE) SET(MODIFIED)* SET(MOUSE)dSET(UID) TPUNAL_OPEN statement. Syntax( SET (KEYSTROKE_RECOVERY, {ON | OFF}) ParametersG KEYSTROKE_RECOVERY A keyword indicating that SET is being used toI control whether an application can use keystroke1 journaling for recovery.K ON A keyword indicating that the DECTPU session is toJ perform a recovery from a keystroke journal file,K even if /NORECOVER is speci fied during invocation.F OFF A keyword indicating that even if /RECOVER isJ specified when DECTPU is invoked, the applicationH need not use a JOURNAL_OPEN statement opening aH journal file. SET (KEYSTROKE_RECOVERY, OFF) isK useful in applications where you want to allow theI use of /RECOVER but you do not want to implement; keystroke journaling and recovery. CommentsG Note that you can use the JOURNAL_OPEN statement without error in aK program even if you have previously used SET (KEYSTROKE_RECOVERY, OFF).K SET (KEYSTROKE_RECOVERY) returns an error if the built-in is used after0 DECTPU has started accepting keyboard input.E Te determine whether a recovery using a keystroke journal file is< currently in progress, use GET_INFO (SYSTEM, "recover"). Example" SET (KEYSTROKE_RECOVERY, OFF);J Allows your application to be invoked with the /RECOVER qualifier evenC if your application does not implement keystroke journaling and recovery. Related Topics6 GET_INFO(buffer_variable) GET_INFO(COMMAND_LINE)3 GET_INFO(SYSTEM) JOURNAL_OPEN JOURNAL_CLOSE$ RECOVER_BUFFER SET(JOURNALING)wwG&;;1 SET(LEFT_MARGIN) SET(LEFT_MARGIN)G Allows you to set the left margin without setting the right margin. Syntax&  SET (LEFT_MARGIN, buffer, integer) ParametersE buffer The buffer in which the margin is to be set.J integer The column at which the margin is to be set. TheG value must be greater than 0 and less than the3 value of the right margin. ExampleJ The following statement causes the left margin of the buffer containedI in the variable 'my_buffer' to be set to 5. The right margin is left unchanged.$ SET (LEFT_MARGIN, my_buffer, 5); Related Topics SET(RIGHT_MARGIN)wwG&;;1 SET(LEFT_MARGIN_ACTION) SET(LEFT_MARGIN_ACTION)K Specifies an action to be taken when the user presses a self-inserting key4 while the cursor is to the left of the left margin. Syntax% SET (LEFT_MARGIN_ACTION, buffer1,6 [program | buffer2 | range | string | learn]) ParametersJ buffer1 The buffer for which a program is to be activ atedE if the user tries to insert text outside the margin.H program The program to be executed if the user tries toG insert text outside the margin. If you do notG specify this parameter, the previously defined, program is deleted.F buffer2 The buffer containing DECTPU statements to beJ executed if the user trie s to insert text outsideK the margin. If you do not specify this parameter,C the previously defined program is deleted.E range The range containing DECTPU statements to beJ executed if the user tries to insert text outsideK the margin. If you do not specify this parameter,C the previously defined program is deleted.F string The str ing containing DECTPU statements to beJ executed if the user tries to insert text outsideK the margin. If you do not specify this parameter,C the previously defined program is deleted.F learn The learn sequence to be executed if the userI tries to insert text outside the margin. If youF do not specify this parameter, the previously4  defined program is deleted. Related Topics SET(RIGHT_MARGIN_ACTION)wwG&;;1 SET(LINE_NUMBER) SET(LINE_NUMBER)J Determines whether DECTPU displays line numbers when reporting errors. Syntax! SET (LINE_NUMBER, {ON | OFF}) ParametersI ON Causes DECTPU, when reporting errors, to displayK the line number and procedure (if any) at which an( error occurred.H OFF  Suppresses the display of line numbers in error" messages.wwG&;;1 SET(MAPPED_WHEN_MANAGED) SET(MAPPED_WHEN_MANAGED)E Calls the DECwindows Toolkit routine XtSetMappedWhenManaged whichI controls whether a widget instance is mapped to the screen when it is managed. Syntax1 SET (MAPPED_WHEN_MANAGED, widget, {ON | OFF}) ParametersG MAPPED_WHEN_MANAGED A keyword indicating that SET is being used toF  control whether the specified widget instanceB should become visible when it is managed.I widget The widget instance whose mapped status you want to set.I ON A keyword directing DECTPU to make the specifiedH widget visible when it is managed. By default,9 widgets are mapped when managed.C OFF A keyword directing DECTPU not to make theE specified widget visible when it is managed. Related Topics0 CREATE_WIDGET DELETE MANAGE_WIDGET MAP2 REALIZE_WIDGET UNMANAGE_WIDGET UNMAPwwWM;;1 SET(MARGINS) SET(MARGINS)B Sets or changes the left and right margins of a specified buffer. Syntax- SET (MARGINS, buffer, integer1, integer2) ParametersJ buffer The buffer for which you want to set or change the margins.K  integer1 The column at which the left margin is to be set. This mustJ be at least 1 and equal to or greater than the right margin (integer2).G integer2 The column at which the right margin is to be set. ThisK must be less than the maximum record size for the buffer and7 greater than the left margin (integer1). Example& SET (MARGINS, main_buffer, 5, 70);J Sets the left margin of the main buffer at column 5, and the right marginK at column 68. These values are used by the FILL built-in for filling text in the buffer. Related topics: FILL GET_INFO SET(LEFT_MARGIN) SET(RIGHT_MARGIN)wwWM;;1 SET(MAX_LINES) SET(MAX_LINES)G Specifies the maximum number of lines the buffer can contain. If thisJ number is exceeded, DECTPU deletes lines from the beginning of the buffer to make room for new lines. Syntax$ SET (MAX_LINES, buffer, integer) ParametersI buffer The buffer for which you want to set or change the maximum lines.B integer The maximum number of lines for the buffer. If youI specify 0, the feature is turned off; that is, DECTPU does9 not check for the maximum number of lines. Example( SET (MAX_LINES, message_buffer, 20);K Sets the maximum number of lines in the message buffer to 20, so that only( recent messages are kept in the buffer.wwWM;;1 SET(MENU_POSITION) SET(MENU_POSITION)> Sets menu positioning for one or more pop-up menu widgets. Syntax? [{array1 | NONE} :=] SET (MENU_POSITION, mouse_down_button,7 {array2 | NONE | widget}) ParametersG MENU_POSITION A keyword indicating that SET is being used toI enable automatic menu positioning of one or moreH pop-up menu widgets. When the user presses theK  specified mouse button and the application managesK the the pop-up widget, DECTPU positions the pop-upF widget for the current windowing environment.G DECTPU positions the pop-up widget immediatelyI below and to the right of the mouse pointer. IfH this built-in is not used, the pop-up widget isC positioned in the upper left corner of th e! display.D mouse_down_button A keyword for a mouse down button (M1DOWN -A M5DOWN) indicating which mouse button isK associated with the pop-up widget specified in theI third parameter. The Motif style guide requires6 M3DOWN activate pop-up menus.I array2 An integer-indexed array of pop-up widgets to beI set for autom atic menu positioning when the user< presses the specified mouse button.G widget The pop-up widget to be set for automatic menuH positioning when the user presses the specified& mouse button.E NONE A keyword directing DECTPU to stop automaticH positioning of pop-up widgets for the specified& mouse button.J The built-in returns the  keyword NONE when no pop-up widgets were set forH automatic menu positioning prior to calling the built-in. The built-inI returns an integer-indexed array of all the pop-up widgets that were set> for automatic menu positioning prior to calling the built-in. Related Topics0 CREATE_WIDGET DELETE MANAGE_WIDGET MAP2 REALIZE_WIDGET UNMANAGE_WIDGET UNMAPwwWM;;1 SET(MESSAGE_ACTION_LEVEL) SET(MESSAGE_ACTION_LEVEL)J Sets the severity level at which  DECTPU emphasizes completion messages in the manner you specify. Syntax0 SET (MESSAGE_ACTION_LEVEL, {integer | keyword}) ParametersG integer A value between 0 and 3 specifying the severity level atE which DECTPU is to take the action you designate. TheI default value is 2. The severity levels and correspondingF values, in ascending order of severity, are as follows:6 Value Severity Level6  ----- --------------1 1 Success7 3 Informational1 0 Warning/ 2 ErrorG DECTPU performs the action you specify on all completionF messages at the severity level you designate and on all, messages of greater severity.G keyword The keyword associated with a  DECTPU completion message.I DECTPU uses the keyword to determine the severity level ofH the associated completion message and performs the actionF you specify on all completion messages of that severity level or greater. ExamplesI 1. The following statements directs DECTPU to display informational,I warning, and error messages in reverse video for 1/2 second, then in ordinary video.+ SET (MESSAGE _ACTION_TYPE, REVERSE);& SET (MESSAGE_ACTION_LEVEL, 3);J 2. The following statements direct DECTPU to ring the terminal's bellG whenever a completion status occurs with a severity equal to or2 greater than the severity of TPU$_SUCCESS.( SET (MESSAGE_ACTION_TYPE, BELL);1 SET (MESSAGE_ACTION_LEVEL, TPU$_SUCCESS); Related Topic SET(MESSAGE_ACTION_LEVEL)wwWM;;1 SET(MESSAGE_ACTION_TYPE) SET(MESSAGE_ACTION_TYPE)I Sets the action to be taken when DECTPU generates a completion status of the severity you specify. Syntax6 SET (MESSAGE_ACTION_TYPE, {NONE | BELL | REVERSE}) ParametersF NONE Directs DECTPU to take no action. This is the default.K BELL Directs DECTPU to ring the terminal's bell when a completion7 status of the specified severity occurs.I REVERSE Directs DECTPU to display the completion status in reverseF video for second, then display the status in ordinary video. Comments> To set the severity at which the action is taken, use the SETC (MESSAGE_ACTION_LEVEL) built-in. The action you specify using SETB (MESSAGE_ACTION_TYPE) is taken for all completion messages of the( specified severity or greater severity. ExampleK The following statements directs DECTPU to display informational, warning,E and error messages in reverse video for 1/2 second, then in ordinary video:' SET (MESSAGE_ACTION_TYPE, REVERSE);" SET (MESSAGE_ACTION_LEVEL, 3); Related Topic SET(MESSAGE_ACTION_LEVEL)wwWM;;1 SET(MESSAGE_FLAGS) SET(MESSAGE_FLAGS)H Specifies the message flags for your process , according to the $PUTMSG; system service, to include or suppress items of a message. Syntax SET (MESSAGE_FLAGS, integer) ParametersK integer A bit-encoded value for one of the message flags. The value0 must be less than or equal to 15:$ Bit Value Meaning9 ------------------------------------------5 0 1 Include text of message.6 0 Suppress text of message.8 1 1 Include message identifier.9 0 Suppress message identifier.4 2 1 Include severity level.5 0 Suppress severity level.3 3 1 Include facility name.4 0 Suppress facility name. CommentsD If you do not set message flags, the default message flags for yourH process are used. Setting the message flags to 0 does NOT turn off theJ message text. It causes DECTPU to use the default message flags for yourI process. To turn off all message text, use the DCL command SET MESSAGE. Examples 1. SET (MESSAGE_FLAGS, 2);J Specifies that the message identifier is the only item to be included2  in a DECTPU message. (Integer 2 sets bit 1.) 2. SET (MESSAGE_FLAGS, 5);K Specifies that message text (bit 0=1) and the severity level (bit 2=4)K are to be included in DECTPU messages. (Integer 5 sets bits 2 and 0.) Related topicsD MESSAGE SET(FACILITY_NAME) SET(INFORMATIONAL) SET(SUCCESS)wwgt;;1 SET(MODIFIABLE) SET(MODIFIABLE)< Determines whether a buffer can be modified by the user. Syntax( SET (MODIFIABLE, buffer, {ON | OFF}) ParametersE buffer The name of the buffer that you want to make4 modifiable or unmodifiable.K ON Makes a buffer capable of being modified. This is- the default setting.E OFF Prevents a user from making any changes to aF buffer except creating or deleting markers or? ranges, or deleting the entire buffer.wwgt;;1 SET(MODIFIED) SET(MODIFIED)C Turns on or turns off DECTPU'S internal marker indicating that the$ specified buffer has been modified. Syntax& SET (MODIFIED, buffer, {OFF | ON}) ParametersA buffer The buffer whose marker you want to set.C OFF A keyword that turns off DECTPU's internal0 modified-status marker.B ON A keyword that turns on DECTPU's internal0  modified-status marker.wwgt;; 1 SET(MOUSE) SET(MOUSE)4 Determines whether DECTPU mouse support is enabled. Syntax SET (MOUSE, {ON | OFF}) ParametersF ON Causes DECTPU to recognize mouse keys when pressed, andG allows you to bind programs or procedures to mouse keys.G Enables the LOCATE_MOUSE and POSITION (MOUSE) built-ins.H OFF Disables DECTPU mouse support. Pressing a mouse key when5  the mouse is set to OFF has no effect. CommentsH The default mouse setting depends on the terminal you are using. IfK the DECTPU statement GET_INFO (SCREEN, "dec_crt2") returns TRUE on yourF terminal, mouse support is turned on by default. Otherwise, mouse% support is turned off by default.I Since DECTPU mouse support disables the UIS terminal emulator cut andI paste feature, you must turn off DECTPU mouse support to use this cut# and paste capability in DECTPU. Example4 The following statement turns off mouse support: SET (MOUSE, OFF) Related Topics( DEFINE_KEY LOCATE_MOUSE POSITIONwwgt;;1 SET(MOVE_VERTICAL_CONTEXT) SET(MOVE_VERTICAL_CONTEXT)D Sets a buffer's target column for MOVE_VERTICAL operations when theK COLUMN_MOVE_VERTICAL setting is turned on. The target column, or context,J is an attribute specifying the horizontal region in which DECTPU tries toD keep the cursor during successive MOVE_VERTICAL operations. DECTPU7 represents the buffer's context as an encoded integer. Syntax0 SET (MOVE_VERTICAL_CONTEXT, buffer, integer) ParametersI MOVE_VERTICAL_CONTEXT A keyword indicating that the SET built-in isF being used to set a buffer's context. TheE context controls where, in the horizontalA dimension, the cursor can move during5 MOVE_V ERTICAL operations.E buffer The buffer whose context you want to set.G integer An encoded integer representing the contextH value. To derive the value representing theG buffer's context, DECTPU uses two pieces ofK information. One is the screen column in whichB DECTPU tries to keep the cursor duringG MOVE_VERTICAL operations. The other is theK status of the cursor at the time the context isJ set. The algorithm used to encode the integerH is not public. Do not attempt to specify anF actual integer value as a parameter to SETE (MOVE_VERTICAL_CONTEXT). Instead, directK DECTPU to assign the correct integer value to aJ  variable by using the following GET_INFO call:N int := GET_INFO (buffer, "move_vertical_context").H You can then use the variable to specify theM integer parameter to SET (MOVE_VERTICAL_CONTEXT). CommentsG Although you can use SET (COLUMN_MOVE_VERTICAL) to keep the editingF point and cursor in or near one screen column during MOVE_VERTICALI operations, the POSITION built-in can interfere with the operation ofJ SET (COLUMN_MOVE_VERTICAL). The POSITION built-in has the side effectD of resetting the column to which DECTPU tries to position duringJ subsequent MOVE_VERTICAL operations. (The column that DECTPU tries toE keep the cursor near is called the context.) Because of this sideJ effect, programmers need a way to save the value of a buffer's contextK before a POSITION operation and to reset the context to the saved valueK after the POSITION operation.  To save the current context value, use a' statement similar to the following:F the_context := GET_INFO (CURRENT_BUFFER, "move_vertical_context");E To set the context back to that value after using POSITION, use a' statement similar to the following:= SET (MOVE_VERTICAL_CONTEXT, CURRENT_BUFFER, the_context);E Note that you must use the GET_INFO call shown here to obtain theG buffer's context value before you use POSITION. There is no way toC obtain or sp ecify the old context value after you use POSITION. ExampleH saved_context := GET_INFO (CURRENT_BUFFER, "move vertical_context");) saved_location := MARK (FREE_CURSOR); POSITION (message_buffer);G COPY_TEXT ("Unless you save the context before you use POSITION,");L COPY_TEXT ("you cannot restore the context after POSITION changes it."); POSITION (saved_location);? SET (MOVE_VERTICAL_CONTEXT, CURRENT_BUFFER, saved_context);F This code fragment saves the val!ue of the current buffer's contextG before DECTPU positions the editing point to another buffer. AfterI repositioning to the first buffer, the code sets the buffer's context back to its previous value. Related topics7 CURRENT_COLUMN CURRENT_OFFSET CURSOR_VERTICAL8 GET_INFO(buffer_variable) GET_INFO(SYSTEM)A MOVE_VERTICAL POSITION SET(COLUMN_MOVE_VERTICAL)wwgt;;1 SET(NO_WRITE) SET(NO_WRITE)E Specifies that, oS SET(MESSAGE_ACTION_TYPE)SET(MESSAGE_FLAGS)VSET(MODIFIABLE) SET(MODIFIED)* SET(MOUSE)SET(MOVE_VERTICAL_CONTEXT) SET(NO_WRITE)#SET(OUTPUT_FILE)%SET(OVERSTRIKE)&SET(PAD))SET(PAD_OVERSTRUCK_TABS), SET(PERMANENT)-TSET(POST_KEY_PROCEDURE)16SET(PRE_KEY_PROCEDURE)5SET(PROMPT_AREA)7SET(RECORD_ATTRIBUTE)CxSET(RECORD_MODE)I SET(RESIZE_ACTION)K SET(REVERSE)dSET(UID) TPU"n exiting, no output file is to be created from theI contents of the buffer (even if it has been modified). For example, youF may create paste buffers or "scratchpad" buffers that you do not want written out when you exit. Syntax' SET (NO_WRITE, buffer, [{OFF | ON}] Parameters6 buffer The buffer you want to set to no-write.J OFF Sets a buffer from no-write to the default state. When theI editor exits, the buffer will be written to disk if# it has been modified.E ON Sets a buffer to no-write. When the editor exits, the2 buffer will NOT be written to disk. Examples" 1. SET (NO_WRITE, paste_buffer);K Sets the paste buffer to no-write. When you exit, DECTPU does not tryD to write out this buffer to a file, even if the buffer has beenG modified. During a session, you can write out the buffer by using WRITE_FILE.$ 2. SET (NO_WRITE, my_buffer, OFF);K $ Changes the buffer MY_BUFFER from no-write. On exiting, DECTPU writesH out this buffer using the output file specification associated withJ the buffer. If there is no output file specification for the buffer, DECTPU prompts you for one. Related topics6 EXIT QUIT SET(MODIFIABLE)1 SET(OUTPUT_FILE) SET(SYSTEM) WRITE_FILEwww;;1 SET(OUTPUT_FILE) SET(OUTPUT_FILE)G Specifies the output file for a buffer. On exiti%ng, if the buffer hasG been modified and is not set to no-write, DECTPU writes out the buffer% using the output file specification. Syntax% SET (OUTPUT_FILE, buffer, string) ParametersB buffer The buffer for which you want to set an output file specification.I string The output file specification for the buffer. By default,J the output file specification is the same as the input fileI specification (if any), wit&h a version number one greater. ExampleI The following statements set the output file specification for the pasteG buffer to LATEST_CUTS.TXT and write out the paste buffer to that file:7 SET (OUTPUT_FILE, paste_buffer, "latest_cuts.txt"); WRITE_FILE (paste_buffer); Related topics3 EXIT QUIT SET(MODIFIABLE). SET(NO_WRITE) SET(SYSTEM) WRITE_FILEwww;;1 SET(OVERSTRIKE) SET(OVERSTRIKE)F Sets or changes the mode 'for entering text in the specified buffer toH overstrike. New characters replace existing characters starting at the2 current position. The default setting is insert. Syntax SET (OVERSTRIKE, buffer) Example% SET (OVERSTRIKE, CURRENT_BUFFER);E Sets the mode for entering text in the current buffer to overstrike. Related topics' COPY_TEXT MOVE_TEXT SET(INSERT)www;; 1 SET(PAD) SET(PAD)G Determines whether DECTPU pads the end of lines( with blanks instead ofE ending a line at the end of record. Thus, when video attributes areH applied to a padded window, it has an even or "boxed" appearence on theI right side. This only affects the display; it does NOT change the text.H Disabling padding improves performance. You enable padding for special visual effects. Syntax SET (PAD, window {OFF | ON} ParametersE window The window in which you want to set padding on or off.B OFF Specifies ) that lines on the screen stop at the lastK character of a record. When video attributes are applied toG the window, it has an uneven or ragged appearance at the8 right side. This is the default setting.E ON Specifies that DECTPU pads the end of a line by addingK blanks after the last character of a record, until the rightH edge of the window. If there are not enough lines in theG buffer to f*ill an entire window, DECTPU adds blank linesD from the end-of-buffer line to the end of the window. ExampleK The following statements turn padding on and display the window in reverseC video; the padding gives the window an even, or boxed, right side:! SET (PAD, second_window, ON);( SET (VIDEO, second_window, REVERSE); Related topics) SET(PAD_OVERSTRUCK_TABS) SET(VIDEO)www;;1 SET(PAD_OVERSTRUCK_TABS) SET(PAD_OVERSTRUCK_TABS)+K Determines what DECTPU does when a user, working in a buffer whose textK insertion mode is OVERSTRIKE, types one or more characters in the white space created by a tab. Syntax( SET (PAD_OVERSTRUCK_TABS, {ON | OFF} ParametersE ON In a buffer where the text insertion mode isE OVERSTRIKE, ON causes DECTPU to preserve theF column positions of existing text when a userI ent ,ers text in the white space created by a tab.E OFF In a buffer where the text insertion mode isI OVERSTRIKE, causes DECTPU to convert from tabbedK space to blanks any white space to the left of theK inserted text, remove the tab, and replace it withJ inserted text. As a result, text to the right ofJ the tab often moves left when the tab is removed.-www;;1 SET(PERMANENT) SET(PERMANENT)H Sets a buffer to permanent, so it cannot be deleted. This is useful ifI you create buffers for procedures to use in manipulating text or storing. data. By default, buffers are not permanent. Syntax SET (PERMANENT, buffer) Example" SET (PERMANENT, paste_buffer);K Sets the paste buffer to permanent, so it cannot be deleted. Once you setE a buffer to permanent, it cannot be reset so that it can be deleted.. Related topics2 SET(NO_WRITE) SET(OUTPUT_FILE) SET(SYSTEM)www;;1 SET(POST_KEY_PROCEDURE) SET(POST_KEY_PROCEDURE)J Specifies a procedure to be executed after execution of the program bound to a defined key. Syntax. SET (POST_KEY_PROCEDURE, keymap_list_name,5 [program | buffer | range | string | learn]) ParametersH keymap_list_name An expression evaluating to a string specifyingI the keymap list for w /hich you want the procedure& to be called.F program The program to be compiled, if necessary, andK executed when a defined key is pressed. If you doK not specify this parameter, the previously defined, program is deleted.F buffer The buffer containing DECTPU statements to beD compiled, if necessary, and executed when aG 0 defined key is pressed. If you do not specifyJ this parameter, the previously defined program is! deleted.E range The range containing DECTPU statements to beD compiled, if necessary, and executed when aG defined key is pressed. If you do not specifyJ this parameter, the previously defined program is! deleted.F 1string The string containing DECTPU statements to beD compiled, if necessary, and executed when aG defined key is pressed. If you do not specifyJ this parameter, the previously defined program is! deleted.I learn The learn sequence to be replayed when a definedD key is pressed. If you do not specify thisE parameter2, the previously defined program is! deleted. ExampleG The following code displays a message after the code bound to a key is executed:0 SET (POST_KEY_PROCEDURE, "tpu$key_map_list",H 'MESSAGE ("Key " + GET_INFO (LAST_KEY, "name") + " Executed")');www;;1 SET(PRE_KEY_PROCEDURE) SET(PRE_KEY_PROCEDURE)H Specifies a procedure to be executed before execution of the program or' learn sequence bound to a defined key. Syntax 3- SET (PRE_KEY_PROCEDURE, keymap_list_name,5 [program | buffer | range | string | learn]) ParametersJ keymap_list_name A string specifying the keymap list for which you9 want the procedure to be called.F program The program to be compiled, if necessary, andJ executed when a define key is pressed. If you doK not specify this parameter, the previously defined, 4 program is deleted.F buffer The buffer containing DECTPU statements to beD compiled, if necessary, and executed when aG defined key is pressed. If you do not specifyJ this parameter, the previously defined program is! deleted.E range The range containing DECTPU statements to beD compiled, if necessary, and executed when aG 5 defined key is pressed. If you do not specifyJ this parameter, the previously defined program is! deleted.F string The string containing DECTPU statements to beD compiled, if necessary, and executed when aG defined key is pressed. If you do not specifyJ this parameter, the previously defined program is! delet6ed.B learn The learn sequence to be replayed when anK appropriate key is pressed. If you do not specifyJ this parameter, the previously defined program is! deleted. ExampleH The following code displays a message before the code bound to a key is executed:/ SET (PRE_KEY_PROCEDURE, "tpu$key_map_list",D 'MESSAGE ("Executing Key " + GET_INFO (LAST_KEY, "name"))');ww;;71 SET(PROMPT_AREA) SET(PROMPT_AREA)H Determines the location, size, and video attributes of the prompt area.A This is the area in which the prompts generated by READ_LINE are displayed. Syntax> SET (PROMPT_AREA, integer1, integer2, {NONE | BOLD | BLINK | REVERSE | UNDERLINE}) ParametersF integer1 The screen line number at which the prompt area starts.= integer2 The number of screen lines in the prompt area.+ NONE No video attribut8es applied.8 BOLD Characters in the prompt area are bolded.3 BLINK Characters in the prompt area blink.B REVERSE Characters in the prompt area are in reverse video.< UNDERLINE Characters in the prompt area are underlined. Example& SET (PROMPT_AREA, 24, 1, REVERSE);I Sets the prompt area at screen line 24. It is one line and displayed in reverse video.ww;;1 SET(RECORD_ATTRIBUTE) SET(RECORD_ATTRIBUTE)E Sets or alte 9rs any of three possible attributes for the specifiedG record or records. The attributes you can set for a record are its7 left margin, its modifiability, and its visibility. Syntax3 SET (RECORD_ATTRIBUTE, {mark | range | buffer},9 {DISPLAY_VALUE | LEFT_MARGIN},N {display_setting_integer | margin_setting_integer})) orM SET (RECORD_ATTRIBUTE, [marker | range | buffer], MODIFIAB:LE, [ON | OFF]) ParametersK RECORD_ATTRIBUTE A keyword indicating that the SET built-in isF being used to specify or change a record( attribute.E marker The marker marking the the record whose8 attribute you want to set.D range The range containing the records whose8 attribute you want to set.I buffer ; The buffer containing the records for whichE you want to set an attribute. When youH specify a buffer for the second parameter,D the record attribute is applied to all4 records in the buffer.J DISPLAY_VALUE A keyword indicating that you want to affectK the visibility of the record. If you specifyD < the DISPLAY_VALUE keyword as the thirdH parameter, you must specify for the fourthF parameter an integer providing a display& setting.K LEFT_MARGIN A keyword indicating that you want to specifyH the left margin for the specified records.K If you specify the LEFT_MARGIN keyword as theG thir =d parameter, you must specify for theJ fourth parameter an integer providing a left+ margin value.J display_setting_integer An integer value from -127 to +127. This isJ the display setting. To determine whether aG record is to be visible or invisible in aH given window, DECTPU compares the record'sE display sett >ing to the window's displayF setting. (A window's display setting isI specified with SET (DISPLAY_VALUE).) If theJ record's setting is greater than or equal toK the window's setting, DECTPU makes the recordG visible in that window; otherwise, DECTPU9 makes the record invisible.H margin_setting_integer An integ ?er that is the column in which theK left margin should be set. The value must beJ between 1 and the value of the right margin.K (The maximum valid value for the right margin& is 960.)C MODIFIABLE A keyword indicating that you want toI determine whether the specified records areH modifiable. If you @specify the MODIFIABLEF keyword as the third parameter, you mustD specify either ON or OFF as the fourth( parameter.I ON A keyword making records modifiable. Note,F if a buffer has been set as unmodifiableG using SET (MODIFIABLE), you cannot make aH record in that buffer modifiable using SETC A (RECORD_ATTRIBUTE). If the buffer isB modifiable, however, you can use SETA (RECORD_ATTRIBUTE) to make a record+ unmodifiable.D OFF A keyword making records unmodifiable. Comments8 You can set only one attribute with each call to SETF (RECORD_ATTRIBUTE). For example, you cannot change visibility andC modifiability using just one cal Bl. To set more than one record< attribute, use multiple calls to SET (RECORD_ATTRIBUTE).H When you set an attribute for multiple records, each record gets theK same value. For example, if you specify a range of records and a valueG for the left margin attribute, all records in the range receive the same left margin value.I You cannot change the left margin of an unmodifiable record. You canI change the display value of a record at any time. You can change theC: modifiability of a record if the buffer is modifiable. ExamplesJ 1. The following statement sets the left margin of all records in the# current buffer to column 3:? SET (RECORD_ATTRIBUTE, CURRENT_BUFFER, LEFT_MARGIN, 3);> 2. The following statements make the records in the range7 "select_range" invisible in the current window:/ SET (DISPLAY_VALUE, CURRENT_WINDOW, 0);1 SET (RECORD_ATTRIBUTE, select_range, -1);F 3. ThDe following statement makes the current record unmodifiable:D SET (RECORD_ATTRIBUTE, MARK (FREE_CURSOR), MODIFIABLE, OFF); Related Topics@ GET_INFO(BUFFER_VARIABLE) GET_INFO(MARKER_VARIABLE)9 GET_INFO(WINDOW_VARIABLE) SET(DISPLAY_VALUE)7 SET(ERASE_UNMODIFIABLE) SET(LEFT_MARGIN) SET(MODIFIABLE)ww;;1 SET(RECORD_MODE) SET(RECORD_MODE)J Sets the record_mode for a buffer, or for all new buffers created withoutEG an associated input file. Record mode specifies the record format and5 record attributes for files written from the buffer. Syntax@ [keyword1 :=] SET (RECORD_MODE, {buffer | SYSTEM}, keyword2) ParametersE buffer The buffer whose output record mode should be changed.H SYSTEM A keyword indicating that all new buffers created with no9 input file shoud have the new record mode.: keyword2 The keyword specifying the new record mode:D F Keyword Record Format Record AttributesD -------------------------------------------------4 VARIABLE_NONE fab$c_var 0< VARIABLE_FTN fab$c_var fab$m_ftnJ VARIABLE_CR fab$c_var fab$m_cr (VMS default); STREAM fab$c_stm fab$m_crM STREAM_LF fab$c_stmlf fab$m_cr (ULTRIX default); STREAM_CR f Gab$c_stmcr fab$m_cr; SYSTEM_DEFAULT fab$c_var fab$m_cr; SYSTEM_DEFAULT fab$c_stmlf fab$m_crK UNSPECIFIED Use the record mode of the input file ifI supported, else use the current systemD default. Valid only for buffers. CommentsG This built-in does not affect journal files, work files, or sectionG files. A buffer created with no inp Hut file gets the current systemF default record mode. A buffer created with an input file gets theJ record mode from the input file if it is supported. If not supported,F the record mode is left unspecified, and the output file takes the input file record mode.H This built-in optionally returns the previous record mode setting if any.I Record modes are specific to file systems. For example, STREAM_LF isE the only valid record mode for buffers written to diskIs on ULTRIXK systems. Setting the record mode to a value not supported by your fileD system may result in your buffer being written to the disk in an unusable format. Examples, SET (RECORD_MODE, my_buffer, STREAM_LF);J Sets the record_mode of buffer my_buffer to stream_lf. Writing my_bufferJ to a file creates a file with stream_lf record format and carriage return record attributes.+ SET (RECORD_MODE, SYSTEM, VARIABLE_CR);F Sets the default record_mode for Jall new buffers create with no inputH file. Files written from these buffer will have variable length recordG format and carriage return record attributes. This record mode is not supported on ULTRIX systems. Related Topics WRITE_FILEww;;1 SET(RESIZE_ACTION) SET(RESIZE_ACTION)K Specifies code to execute when a DECwindows resize event occurrs. SettingF a resize action routine overrides any previous resize action routine. Syntax3 SET (RESIZE_ KACTION [, {program_source | NONE}]) ParametersE program_source A buffer, learn sequence, program, range, orI string specifying the resize action routine thatE DECTPU should execute whenever it receives a& resize event.I NONE A keyword directing DECTPU to delete the currentD resize action routine. If you specify thisD keyword or do notL specify a parameter, yourK application is not informed when DECTPU receives a6 resize event from DECwindows.ww;;1 SET(REVERSE) SET(REVERSE)I Sets or changes the direction of the specified buffer to reverse (toward3 the left and up). The default setting is forward. Syntax SET (REVERSE, buffer) Example" SET (REVERSE, CURRENT_BUFFER);F Sets the direction for the current buffer to reverse for seMarches and movement. Related topics* SCROLL SET(SCROLLING) SET(FORWARD)ww;;1 SET(RIGHT_MARGIN) SET(RIGHT_MARGIN)G Allows you to set the right margin without setting the left margin. Syntax' SET (RIGHT_MARGIN, buffer, integer) ParametersE buffer The buffer in which the margin is to be set.J integer The column at which the margin is to be set. TheI value must be greater thaOn the value of the left margin. ExampleK The following statement causes the right margin of the buffer containedJ in the variable 'my_buffer' to be set to 132. The left margin is left unchanged.' SET (RIGHT_MARGIN, my_buffer, 132); Related Topics SET(LEFT_MARGIN)ww;;1 SET(RIGHT_MARGIN_ACTION) SET(RIGHT_MARGIN_ACTION)K Specifies an action to be taken when the user presses a self-inserting key6 while the curW5SET(PROMPT_AREA)7SET(RECORD_ATTRIBUTE)CxSET(RECORD_MODE)I SET(RESIZE_ACTION)K SET(REVERSE)LdSET(RIGHT_MARGIN)MVSET(RIGHT_MARGIN_ACTION)RRSET(SCREEN_LIMITS)VSET(SCREEN_UPDATE)`vSET(SCROLLING)[SET(SCROLL_BAR)^SET(SCROLL_BAR_AUTO_THUMB)jSET(SELF_INSERT)lRSET(SHIFT_KEY)p@SET(SPECIAL_ERROR_SYMBOL)s(SET(STATUS_LINE)v SET(SUCCESS)w SET(SYSTEM)y.SET(TAB_STOPS){ SET(TEXT)dSET(UID) TPUPsor is to the right of the right margin. Syntax& SET (RIGHT_MARGIN_ACTION, buffer1,6 [program | buffer2 | range | string | learn]) ParametersJ buffer The buffer for which a program is to be activatedE if the user tries to insert text outside the margin.H program The program to be executed if the user tries toG insert text outside the margin. If you do notG Q specify this parameter, the previously defined, program is deleted.F buffer2 The buffer containing DECTPU statements to beJ executed if the user tries to insert text outsideK the margin. If you do not specify this parameter,C the previously defined program is deleted.E range The range containing DECTPU statements to beJ R executed if the user tries to insert text outsideK the margin. If you do not specify this parameter,C the previously defined program is deleted.F string The string containing DECTPU statements to beJ executed if the user tries to insert text outsideK the margin. If you do not specify this parameter,C the previously defined program is deleted.SF learn The learn sequence to be executed if the userI tries to insert text outside the margin. If youF do not specify this parameter, the previously4 defined program is deleted. Related Topics SET(LEFT_MARGIN_ACTION)ww;;1 SET(SCREEN_LIMITS) SET(SCREEN_LIMITS)H Specifies the minimum and maximum allowable sizes for the screen duringH resize operations. DECTPU passesT these limits to the DECwindows window4 manager, which is free to use or ignore the limits. Syntax SET (SCREEN_LIMITS, array) ParametersG array An integer-indexed array specifying hints for the minimum andE maximum screen width and length. For Motif DECwindows, the. second pair of elements is optional. Usage notes. The array elements specify the following:J 1. The minimum screen width, in columns. Must be at least 0, andJ U less than or equal to the maximum screen width. Default value is 0.I 2. The minimum screen length, in lines. Must be at least 0, andK less than or equal to the maximum screen length. Default value is 0.G 3. The maximum screen width, in columns. Must greater than orH equal to the minimum screen width, and less than or equal toK 255. Default value is 255. This element is optional for MotifF DE VCwindows, but if present, must be accompanied by elementH four. Not specifying element three and four allow the MotifI window manager to make the DECTPU window fill the screen when1 the user presses the maximize button.F 4. The maximum screen length, in lines. Must greater than orI equal to the minimum screen length, and less than or equal toK 255. Default value is 255. This element is optional for Motif DECwinWdows.ww;;1 SET(SCREEN_UPDATE) SET(SCREEN_UPDATE)I Enables or disables screen updating for individual windows or the entireI screen. By default, screen updating is enabled -- characters and cursorJ movements are sent to the screen to reflect the current internal state of! buffers displayed on the screen. Syntax6 SET (SCREEN_UPDATE, {OFF | ON | 0 | 1} [, window]) Parameters? OFF or 0 Disables screen or window updates until turned on.F ON X or 1 Enables screen or window updates, so characters and cursorH movement are sent to the screen. This causes DECTPU to update* the screen or window completely.J window If not specified, updates are turned off for the entire screen.; Otherwise, only the indicated window is affected. Usage notesK Turning off updates for a specific window is used by applications thatH share the screen between DECTPU and some other code, such as FMS orJ DECFoYrms. Such 'clear' windows tell DECTPU which areas of the screen to avoid.G Clear windows must be mapped (using the MAP built-in) to reserve a section of the screen.A Other window built-ins operate on clear windows, as follows:B UPDATE, SCROLL and SET (STATUS_LINE) ignore clear windows.I REFRESH, SET (WIDTH) and SET (HEIGHT) may erase the contents of a clear window.E ADJUST_WINDOW, UNMAP, and DELETE can cause screen lines to be2 Z erased or modified during the next update.J If a clear window becomes the current window because of a POSITIONE or MAP operation, the cursor position is indeterminate, and a6 detached cursor action routine may be invoked. ExampleG The following statements turn screen updating off and on; depending onK what actions occurred while updating is off, the screen may be cleared and* repainted when you turn updating back on:2 SET (SCREEN_UPDATE, OFF); ! Turn[ off updates . .6 SET (SCREEN_UPDATE, ON); ! Turn updates back onG The following statements prevent DECTPU from modifying the contents ofJ lines 1-4 of the screen. All other lines are updated normally. The nextK update after turning on updates will completely repaint lines 1-4 with the contents of clear_buffer.. clear_window := CREATE_WINDOW (1, 4, OFF);, clear_buffer := CREATE_BUFFER ('Empty');% MAP (clear_window, clear_buffer);@ SET (SCREE\N_UPDATE, OFF, clear_window); ! Turn off updates . .D SET (SCREEN_UPDATE, ON, clear_window); ! Turn updates back onww;;1 SET(SCROLL_BAR) SET(SCROLL_BAR)F Enables a horizontal or vertical scroll bar for the specified window. SyntaxK [integer | widget] := SET (SCROLL_BAR, window, {HORIZONTAL | VERTICAL},* {ON | OFF}) ParametersI integer The widget instance implementing the vert ]ical orH horizontal scroll bar associated with a window.E widget The value 0 if an error prevents DECTPU from> associating a widget with the window.J SCROLL_BAR A keyword directing DECTPU to enable or disable a7 scroll bar in a DECTPU window.H window The window in which the scroll bar does or does$ not appear.J HORIZONTAL A keywo ^rd directing DECTPU to enable or disable a/ horizontal scroll bar.J VERTICAL A keyword directing DECTPU to enable or disable a- vertical scroll bar.J ON A keyword indicating that the scroll bar is to be9 visible in the specified window.K OFF A keyword indicating that the scroll bar is not to< be visible in the specified window.ww_<;1 SET(SCROLL_BAR_AUTO_THUMB) SET(SCROLL_BAR_AUTO_THUMB)C Enables or disables automatic adjustment of the scroll bar slider. Syntax@ SET (SCROLL_BAR_AUTO_THUMB, window, {HORIZONTAL | VERTICAL}, {ON | OFF}) ParametersI SCROLL_BAR_AUTO_THUMB A keyword directing DECTPU to enable or disableI automatic adjustment of a scroll bar slider in a' DECTPU window.K window The window wh `ose scroll bar slider you want DECTPU# to adjust.J HORIZONTAL A keyword directing DECTPU to set the slider on a/ horizontal scroll bar.J VERTICAL A keyword directing DECTPU to set the slider on a- vertical scroll bar.G ON A keyword directing DECTPU to enable automatic= adjustment of the scroll bar slider.H OFF A keywo ard directing DECTPU to disable automatic= adjustment of the scroll bar slider.ww<;1 SET(SCROLLING) SET(SCROLLING)J Controls either of two scrolling characteristics, depending on the formatH used. The first format shown in the SYNTAX section controls values forF the scroll margins (the points at the top and bottom of a window thatF trigger vertical scrolling). Note that setting top and bottom scrollA margins has no effect on the cursor's hor bizontal movement duringH scrolling--the cursor remains in the same column during this operation.J The second format controls whether scrolled text is repainted all at onceH (jump scrolling) or a line at a time (smooth scrolling). Note that youD can set DECTPU scrolling behavior to the jump setting or the smoothH setting regardless of whether the terminal scrolling mode is set to theJ jump setting or the smooth setting. For example, if you set the terminalI to SMOOTH SCROLL and set DECTPU sccrolling mode to the jump setting, textK slides smoothly out of the window, but new text is not repainted until all5 currently specified scroll operations are completed. SyntaxE SET (SCROLLING, window, {OFF | ON}, integer1, integer2, integer3) or$ SET (SCROLLING, {JUMP | SMOOTH}) ParametersB window The window in which scrolling limits are to be set.G OFF Disables scrolling. The screen is repainted each time a, scroll would othe drwise occur.! ON Enables scrolling.A integer1 The offset from the top screen line of the window,K identifying the top limit of an area in which the cursor canH move as it tracks the current character position. If theG cursor moves above this screen line, lines in the windowG scroll down so the cursor stays within the limits of the cursor area.D integer2 The offset from the bottom screen lin ee of the window,J identifying the bottom limit of an area in which the cursorH can move as it tracks the current character position. IfK the cursor moves below this screen line, lines in the windowE scroll up so the cursor stays within the limits of the cursor area.J integer3 An integer specifying how many lines from the top or bottomH of the cursor area (defined by integer1 and integer2) theJ f cursor should be positioned when a window is scrolled. ForK example, if the bottom of the cursor area is 14 and integer3J is 0, when text is scrolled up, the cursor is put on screenK line 14. If integer3 is 3, the cursor is put on screen line 11.K JUMP A keyword indicating that DECTPU should not repaint scrolledG text until all currently specified scroll operations areG completed. Whe gn scrolling is set to jump mode, scrolledC text appears to jump from one point in the window toJ another. Scrolling is faster in jump mode, but the text inJ the window may look odd during repainting. To determine ifK the scrolling mode has been set to the jump setting, use theI built-in GET_INFO (SCREEN, "jump_scroll"). A return valueA of 1 indicates that the jump setting is in effect.I SMOOTH Ah keyword indicating that, during scrolling, DECTPU shouldF repaint each new line of text as it is brought into theF window. When scrolling is set to smooth mode, the textH appears to slide smoothly in and out of the window. ThisJ setting is the default. To determine if the scrolling modeC has been set to the smooth setting, use the built-inE GET_INFO (SCREEN, "jump_scroll"). A return value of 0> i indicates that the smooth setting is in effect. Examples/ 1. SET (SCROLLING, main_window, ON, 0, 0, 2);J Causes the main window to scroll as follows: when the cursor reachesG the top or bottom of the window, lines are moved off the screen toI make room for new lines. The cursor is positioned on a line that isG offset 2 lines from the either the top or bottom, depending on the* direction in which you are scrolling.0 2. SET (SCROLLING, main_window, ON, j0, 0, 21);I Does the same thing as Example 1 -- except, if the main window is 21G lines long, the cursor is repositioned at the top or bottom of theJ window, depending on the direction in which you are scrolling. Thus,C each time a scrolling occurs, an entire window's worth of text appears. 3. SET (SCROLLING, JUMP);J Causes DECTPU to refrain from repainting any new lines of text duringH scrolling until all currently specified scroll operations have beken completed. Related topics8 GET_INFO(SCREEN) SCROLL SET(CROSS_WINDOW_BOUNDS) SET(FORWARD) SET(REVERSE)ww<;1 SET(SELF_INSERT) SET(SELF_INSERT)H Determines whether printable characters are inserted when entered if no procedures are bound to them. Syntax) SET (SELF_INSERT, string, {OFF | ON}) ParametersK string Specifies the key-map list for which self-inserting is to be turned off or on.J OFlF Disables self-inserting, causing the UNDEFINE_KEY procedureB to be called when printable characters are entered.I ON Enables self-inserting, when the specified key-map list is4 active. This is the default setting. ExampleK The following procedure turns off and on self-inserting for the key-map% list bound to the current buffer: PROCEDURE toggle_self_insert LOCAL the_key_map_list;E the_key_map_list := GET_INFO m(CURRENT_BUFFER, "key_map_list");4 IF GET_INFO (the_key_map_list, "self_insert") THEN3 SET (SELF_INSERT, the_key_map_list, OFF); ELSE2 SET (SELF_INSERT, the_key_map_list, ON); ENDIF; ENDPROCEDURE; Related topics) UNDEFINED_KEY SET(UNDEFINED_KEY)ww<;1 SET(SHIFT_KEY) SET(SHIFT_KEY)G Specifies the shift key for use in other key definitions. There is no0 relation to the SHIFT key on the main keynboard. Syntax& SET (SHIFT_KEY, keyname [,string]) ParametersG keyname Specifies the key you want to use as the shift key. See& help on KEYNAMES TABLE.J string The key-map list for which the shift key is to be used. IfJ you do not specify a key-map list, the key-map list for the& current buffer is used. CommentsI Using a shift key lets you assign two bindings to a key. One binding isK executed when you press t ohe shift key and the other key; the other bindingI is executed when you press the other key alone. For example, if you use the following statements: SET (SHIFT_KEY, F17);F DEFINE_KEY ("COPY_TEXT ('Sincerely,')", KEY_NAME ("s",SHIFT_KEY));G Pressing F17 and the letter S inserts the word "Sincerely"; otherwise,) pressing S alone inserts that character.K Only one shift key can be active at a time. By default, PF1 is the DECTPU@ shift key. If you want to use PF1 for another ppurpose, use SETI (SHIFT_KEY) to specify a key other than PF1. You can use any key as theH shift key, as long as DECTPU allows you to define the key at all. (See help on NONDEFINABLE KEYS.) Examples. 1. SET (SHIFT_KEY, F17, "tpu$key_map_list");C Specifies F17 as the shift key for the specified key-map list.K 2. If you do not want a shift key for your application, use the following statement:/ SET (SHIFT_KEY, KEY_NAME (PF1, SHIFT_KEY); Related topics4q DEFINE_KEY KEY_NAME SHIFT_KEY UNDEFINE_KEYww<;1 SET(SPECIAL_ERROR_SYMBOL) SET(SPECIAL_ERROR_SYMBOL)G Designates the global variable that you want DECTPU to set to 0 when a+ case-style error handler handles a CTRL/C. Syntax# SET (SPECIAL_ERROR_SYMBOL, string) ParameterJ string The name of the global variable that you want DECTPU to set; to 0 when an error handler handles a CTRL/C. CommentsK Once you designate the r variable that is to be the special error symbol,J DECTPU sets the variable to 0 if either of the following events occur:H o DECTPU executes the TPU$_CONTROLC selector in a case-style error handler, orJ o DECTPU executes the OTHERWISE clause in a case-style error handler1 and does not encounter a RETURN statementG You can only use SET (SPECIAL_ERROR_SYMBOL) once in a program. YouD must declare or create the variable before you use it in the SETA sstatement. DECTPU does not clear the variable in response to" non-case-style error handlers.G The variable specified by SET (SPECIAL_ERROR_SYMBOL) can be used toG determine whether DECTPU has exited from current procedures and has+ returned to waiting for a new keypress. ExampleH The following statement designates the global variable "mork" as theK variable to be cleared if DECTPU executes the TPU$_CONTROLC selector in a case-style error handler:$ SET t(SPECIAL_ERROR_SYMBOL, mork)ww7<;1 SET(STATUS_LINE) SET(STATUS_LINE)H Sets or changes the attributes of the status line -- the last line in aF window -- for displaying regular text or status information about the window or its buffer. Syntax4 SET (STATUS_LINE, window, {NONE | BOLD | BLINK |9 REVERSE | UNDERLINE | SPECIAL_GRAPHICS}, string); ParametersA window The window for which the status line is to be set.> NONE To apply uno video attributes to the characters.) BOLD To make characters bolded.( BLINK To make characters blink.: REVERSE To make characters appear in reverse video.- UNDERLINE To make characters underlined. SPECIAL_GRAPHICSJ To display graphic characters from the DEC Special GraphicsI Set (or VT100 Line-Drawing Character Set), such as a solidJ line. For more information, see the programming manual for0 v the video terminal you are using.G string The text to be displayed on the status line (such as theI name of the buffer in the window). If you want no text in7 the status line, use a null string (""). ExampleJ 1. SET (STATUS_LINE, main_window, REVERSE, "MAIN BUFFER: newfile.txt");K Sets the status line for the main window to display the quoted text in reverse video.0 2. SET (STATUS_LINE, second_window, NONE, "");G Removesw the status line for the second window by setting the final parameter to a null string.G 3. The following statements draw a solid line across the status line:: y := "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq" +8 "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq") x := CREATE_WINDOW (1, 20, OFF);! MAP (x, current_buffer);3 SET (STATUS_LINE, x, SPECIAL_GRAPHICS, y);ww7<;1 SET(SUCCESS) SET(SUCCESS)1 Enables or disables dxisplay of success messages. Syntax SET (SUCCESS {OFF | ON}) Parameters/ OFF Disables display of success messages.C ON Enables display of success messages. This is the default setting. Example SET (SUCCESS, OFF);& Disables display of success messages. Related topics: SET(FACILITY_NAME) SET(INFORMATIONAL) SET(SUCCESS)ww7<; 1 SET(SYSTEM) SET(SYSTEM)G Makes a buffer a system buffer. This is useful wheyn creating your ownH editor in which you want to distinguish system buffers, such as a pasteG buffer, from those that users can edit. DECTPU does not handle systemJ buffers differently from user buffers; DECTPU merely keeps track of whichG buffers have been designated as system buffers. It is the application< layered onto DECTPU that gives system buffers their special characteristics.J Once a buffer is made a system buffer, it cannot be reset to being a user buffer. Syntax z SET (SYSTEM, buffer) ExampleD The following statements create a paste buffer and make it a system buffer:, paste_buffer := CREATE_BUFFER ("paste"); SET (SYSTEM, paste_buffer); Related topicsD SET(MODIFIABLE) SET(NO_WRITE) SET(OUTPUT_FILE) SET(SYSTEM)ww7<;1 SET(TAB_STOPS) SET(TAB_STOPS)' Sets or changes tab stops in a buffer. Syntax/ SET (TAB_STOPS, buffer, {string | integer}) Parameters> buffer The buffer fo {r which you want to set tab stops.I string A string of numbers specifying the tab stops. The minimumJ value of a tab stop is 1; the maximum is 65535; the maximumJ number of stops is 100. The tab stops must be in ascending6 order. Separate the values by a space.H integer An interval between tabs, rather than the actual tab stopE positions. The minimum value 1; the maximum is 65535. Examples/ 1. SET (TAB_STOPS,| main_buffer, "4 8 12 16");D Sets tab stops for the main buffer at columns 4, 8, 12, and 16.% 2. SET (TAB_STOPS, main_buffer, 4);B Sets tab stops for the main buffer at intervals of 4 columns.ww7<; 1 SET(TEXT) SET(TEXT)H Sets or changes the way text is displayed in a window, or sets the text that is to appear in a widget. Syntax" Choose either of two variants:B SET (TEXT, window, {BLANK_TABS | GRAPHIC_TABS | NO_TRANSLATE}) } or SET (TEXT, widget, string) Parameters= window The window for which you are setting text.F BLANK_TABS Displays tabs as blank spaces. This is the default setting.K GRAPHIC_TABS Displays tabs as special graphic characters (which makes= the value of each tab stop easier to see).K NO_TRANSLATE Sends every character in the displayed lines directly toB the screen without any tr ~anslation. Any escapeJ sequences in the text are transmitted. DECTPU does notF control or keep track of how these escape sequencesF affect the terminal. Use this keyword with extreme care.K widget The instance of a simple text widget whose text you wantE to set. Valid only in the DECwindows environment.I string The text you want to assign to the simple text widget. Examples+ 1. SET (TEXT, main_window, graphic_tabs);@ Sets the text in the main window to display tabs as graphic characters.E 2. The following procedure shows a use of the NO_TRANSLATE keyword;H notice that the default setting is restored as soon as the function: for which NO_TRANSLATE is set has finished executing: PROCEDURE user_print_screenA ! If terminal has printer connected to printer port,A ! use this to print the screen contents. Set window@ ! to NO_TRANSLATE to allow escape sequences to pass0 ! to printer, then restore setting.1 SET (TEXT, message_window, NO_TRANSLATE);$ MESSAGE (ASCII (27) + "[i"); UPDATE (message_window); !2 ! Put back the window the way it was. !/ SET (TEXT, message_window, BLANK_TABS); ERASE (message_buffer); ENDPROCEDURE;ww7<; 1 SET(TIMER) SET(TIMER)H Enables or disables display of flashing messages in the prompt area.H When display of these messages is enabled, the DECTPU timer displays3 your specified message at one-second intervals. Syntax# SET (TIMER, {OFF | ON}, string) Parameters' OFF Disables timer messages.& ON Enables timer messages.I string The text of the timer message, to be displayed in the lastJ 15 characters of the prompt area. The maximum length is 15J characters. With ON, the default string is "Working..." IfI you specify a string, that string is saved and used as the default. CommentsB Timed messages are off by default. The first timed message isF displayed three seconds after you press a key that executes a slowH procedure; this prevents displaying unnecessary timed messages while executing short procedures. Example$ SET (TIMER, ON, "Executing...");I Causes the message "Executing..." to be displayed in the prompt area.> This is useful when you are executing a lengthy procedure.ww^<;1 SET(TRACEBACK) SET(TRACEBACK)J Determines whether DECTPU includes the procedure calling sequence when" an error message is displayed. Syntax SET (TRACEBACK, {ON | OFF} ParametersG ON Causes DECTPU to include the procedure callingK sequence preceding the error when an error messageJ Hp@SET(SPECIAL_ERROR_SYMBOL)s(SET(STATUS_LINE)v SET(SUCCESS)w SET(SYSTEM)y.SET(TAB_STOPS){ SET(TEXT) SET(TIMER)xSET(TRACEBACK)dSET(UID)SET(UNDEFINED_KEY) SET(VIDEO) SET(WIDGET)SET(WIDGET_CALLBACK)SET(WIDGET_CALL_DATA)SET(WIDGET_CONTEXT_HELP)\SET(WIDGET_RESOURCE_TYPES) SET(WIDTH)jSHIFTSHOW|SLEEPSPANSPANLSPAWN` SPLIT_LINESTRSUBSTR TPU  is displayed. If no section file was loaded whenG DECTPU was invoked, the default setting is ON.H OFF Suppresses the display of the procedure callingK sequence in error messages. If a section file wasD loaded when DECTPU was invoked, the default( setting is OFF.ww^<;1 SET(UNDEFINED_KEY) SET(UNDEFINED_KEY)C Determines the action taken when an undefined key-map key is used. Syntax* SET (UNDEFINED_KEY, string [, action]) Parameters2 string The key-map list for the procedure.K action A string, buffer, range, or program specifying the action toF be taken on an undefined key. If you specify a string,K buffer, or range, it is compiled. The default is to display1 a message "Key has no definition." ExampleK The following statements cause the default message for an undefined key to, be displayed when an undefined key is used:9 IF GET_INFO ("tpu$key_map_list", "undefine_key") <> 0 THEN2 SET (UNDEFINED_KEY, "tpu$key_map_list"); ENDIF;ww^<; 1 SET(VIDEO) SET(VIDEO)2 Sets or changes the video attributes of a window. SyntaxD SET (VIDEO, window, {NONE | BOLD | BLINK | REVERSE | UNDERLINE}) ParametersE window The window for which you are setting video attributes.E NONE To apply no attributes to the characters. This is the default setting.. BOLD To make characters appear bold.( BLINK To make characters blink.: dREVERSE To make characters appear in reverse video.' UNDERLINE To underline characters. CommentsI Video attributes are cumulative. The window assumes the video attributeH of each keyword you set with SET (VIDEO) during an editing session. IfK you do not want the cumulative effects of previous attributes, specify the3 NONE keyword before specifying any new attributes.I Video attributes are applied during the next screen update. SET (VIDEO)B does not affect the status line of a window. To change the videoI attributes of the status line, specify the attributes of the status line: when you create the window or by using SET (STATUS_LINE). ExampleI The following statements make the current window appear in reverse video and with underlining:) SET (VIDEO, CURRENT_WINDOW, REVERSE);+ SET (VIDEO, CURRENT_WINDOW, UNDERLINE); Related topics% CREATE_WINDOW SET(STATUS_LINE)ww^<; 1 SET(WIDGET) SET(WIDGET)> Allows you to assign values to various resources of a widget. Syntax* SET (WIDGET, widget, widget_arguments) ParametersJ WIDGET A keyword directing DECTPU to set an attribute of" a widget.J widget The widget instance whose v alues you want to set.I widget_arguments A series of pairs of resource names and resourceJ values. You can specify a pair as an array or asF a pair of separate parameters. If you use anI array, you index the array with a string that isG the name of the resource you want to set. TheE array element contains the value you want toG assign to that resource. If you use a pair ofJ separate parameters, specify the resource name asI a string, then the resource value. Separate theF name from the value with a comma. Arrays andG string/value pairs may be used together. EachI array index and its corresponding element value,I or each string and its corresponding value, mustJ  be valid widget arguments for the class of widget* you are creating. ExampleI The following statements set the "Nvalue" resource of the current EVEI window's scroll bar widget to 100. This causes the scroll bar sliderH to be displayed as far toward the bottom of the scroll bar widget as possible.H scroll_bar_widget := SET (SCROLL_BAR, CURRENT_WINDOW, VERTICAL, ON);; SET (WIDGET, scroll_bar_widget, eve$dwt$c_Nvalue, 100);ww^<;1 SET(WIDGET_CALL_DATA) SET(WIDGET_CALL_DATA)G Allows you to create a template telling DECTPU how to interpret theD information in the fields of a widget's callback data structure. Syntax/ SET (WIDGET_CALL_DATA, widget, reason_code,@ request_string, keyword [, request_string, keyword...]) ParametersF WIDGET_CALL_DATA A keyword indicating that the SET built-in isD being used to control how DECTPU interpretsK  information in a widget's callback data structure.K widget The specific widget instance for which you want toI determine how the callback data are interpreted.J reason_code The identifier for the reason code with which theD callback data structure is associated. ForI example, if you are using SET (WIDGET_CALL_DATA)D to set the format of the callback structureJ associated with the Help Requested reason code ofG the File Selection widget, and if your programK defines the VAX reason code bindings as constants,J you could refer to the Help Requested reason code9 by using the constant XmCR_HELP.I request_string One of the six valid strings describing the dataA type of a given fie ld in a callback dataF structure. The valid strings are as follows:: "char" "short"9 "compound_string" "void"; "int" "widget"F keyword One of the four valid keywords indicating theH DECTPU data type to which DECTPU should convertE the data in a given field of a callback dataG  structure. The valid keywords are as follows:> INTEGER UNSPECIFIED9 STRING WIDGETJ Use the request_string parameter with the keywordJ parameter to inform DECTPU, for each field of theK structure, what data type the field has originallyE and what DECTPU data type corresponds to the@  original data type. The valid keywordsD corresponding to each request string are as! follows:M Request String Valid Corresponding KeywordsM -------------- ----------------------------G "char" STRING or UNSPECIFIEDG "compound_string" STRING or UNSPECIFIEDG "i nt" INTEGER or UNSPECIFIEDG "short" INTEGER or UNSPECIFIEDG "void" UNSPECIFIEDG "widget" WIDGET or UNSPECIFIED CommentsK You use SET (WIDGET_CALL_DATA) to tell DECTPU what data type to ascribeH to each field in the callback data structure associated with a givenB callback reason of a given widget instance. During a callbackF  generated by the specified widget for the specified reason, DECTPUB interprets the data in the callback structure according to the description you create.G In an application layered on DECTPU, you can obtain the interpreted9 callback data by using the built-in GET_INFO (WIDGET, "callback_parameters").D You can create a different template for each of the reason codesJ associated with a given widget. To do so, make a separate call to theI SET (WIDGET_CALL_DAT A) built-in for each reason code. If you specifyJ the same widget and reason code in more than one call, DECTPU uses the# most recently specified format.J In all callback data structures defined by the DECwindows Toolkit, theE first field is the reason field and the second field is the eventJ field. If your application creates and uses a new kind of widget, the< widget's callback structure must follow this convention.J Do not specify any request string or keyword f or the reason field. InI almost all cases, you specify the event field with the request stringJ "void" and the keyword UNSPECIFIED. Specify all subsequent fields, ifH the callback structure has such fields, up to and including the lastD field you want to specify. Note that the VAX longword data typeH corresponds to the "int" request string and the INTEGER data type in DECTPU.G Although you can skip trailing fields, you cannot skip intermediateG fields even if t hey are unimportant to your application. To directF DECTPU to ignore the information in a given field, use the requestI string "void" and the keyword UNSPECIFIED when specifying that field.G For more information on how SET (WIDGET_CALL_DATA) affects GET_INFOK (WIDGET, "callback_parameters"), see the help topic GET_INFO(WIDGET) or+ the DEC Text Processing Utility Manual. Example? The following code fragment begins by defining the constantC DWT$C_CRSINGLE to be the integer value 20, which is the integerF associated with the reason "user selected a single item." The nextK statement tells DECTPU how to interpret the fields of the callback dataH structure associated with a List Box widget assigned to the variableK "initial_list_box". The statement directs DECTPU to ignore the data inE the "event" field and to treat the data in the item field as typeE STRING, in the "item length" field as type INTEGER, and the "item" number" field as type INTEGER." CONSTANT DWT$C_CRSINGLE := 20;< SET (WIDGET_CALL_DATA, initial_list_box, DWT$C_CRSINGLE,1 "void", UNSPECIFIED, ! event0 "compound_string", STRING, ! item7 "int", INTEGER, ! item length7 "int", INTEGER); ! item number Related Topics, GET_INFO(WIDGET) SET(WIDGET_CALLBACK)wwׅ<;1 SET(WIDGET_CALLBACK) SET(WIDGET_CALLBACK)K Specifies the DECTPU program or learn sequence to be called by DECTPU when2 a widget callback occurs for the widget instance. Syntax: SET (WIDGET_CALLBACK, widget, program_source, closure) Parameters> WIDGET_CALLBACK A keyword directing DECTPU to set the; application-level widget callback.G widget The widget instance whose callback you want to set.F program_source The string, buffer, range, learn sequence, orK program specifying the application-level callback.I This code is executed when the widget performs a, callback to DECTPU.I closure A string or integer. DECTPU passes the value toC the application when the widget performs a, callback to DECTPU. ExampleK The following statement designates the procedure "user_scroll_dispatch"G as the callback routine handling events from the scroll bar widget.J The statement designates the closure for the callback as the character "h".J SET (WIDGET_CALLBACK, scroll_bar_widget, "USER_SCROLL_DISPATCH", "h");wwׅ<;1 SET(WIDGET_CONTEXT_HELP) SET(WIDGET_CONTEXT_HELP)J Specifies the widget within which context-sensitive help interaction willE occur until the user clicks M1 on a widget. Valid only in the Motif DECwindows environment. Syntax9 SET (WID GET_CONTEXT_HELP, widget, {ON | 1 | OFF | 0}) ParametersF WIDGET_CONTEXT_HELP A keyword directing DECTPU to enter the MotifG context-sensitive help mode in which the mouseJ pointer changes to a question mark until the userG clicks M1 on a widget. The mouse pointer thenI reverts to the default pointer shape, and a helpJ callback is called on the selected widget ( or itsB parent if the selected widget has no help# callback).H widget The widget instance within which the modal helpH interaction will be limited. Applications willG normally specify the top level widget returnedJ from the GET_INFO (SCREEN, "widget") built-in. AD help callback occurs only when the mouse isF  clicked on the specified widget or any of its* children widgets.B ON Confines the question mark pointer to theH specified widget. If any children widgets haveB been moved outside the specified widget'sJ boundaries, then the question mark pointer cannotI be moved to those children unless this parameter% is OFF or 0.$ 1  Same as ON.J OFF Does not confine the question mark pointer to the* specified widget.% 0 Same as OFF. ExampleH The following statement enters context-sensitive help mode, and doesI not restrict the question mark mouse pointer to the boundaries of theC top level DECTPU widget. This lets the pointer be moved to theD application dialog boxes that have been moved outside the DECTPU boundaries.@ SET (WIDGET_CONTEXT_HELP, GET_INFO (SCREEN, "widget"), OFF);wwׅ<;1 SET(WIDGET_RESOURCE_TYPES) SET (WIDGET_RESOURCE_TYPES)J Adds new widget resource types to the list of types that DECTPU supports.6 This built-in is valid only in the Motif environment. SyntaxH SET (WIDGET_RESOURCE_TYPES, widget_data_type, widget_resource_types) ParameterE WIDGET_RESOURCE_TYPES A keyword directing DECTPU to add new MotifG widget resource types to the list of supportedI resource types. If you redefine a resource typeG to be of another data type, DECTPU signals theE warning TPU$_TYPEREDEFINED. You cannot saveE resources in section files. DECTPU does notG verify that your third parameter specifies theJ name of a valid widget resource or resource type.J  If you misspell the third parameter, you will getJ an error when you try to use that resource with aC widget. For the current list of supported0 resource types, see theK GET_INFO(WIDGET,"widget_resource_types") built-in.E widget_data_type A string that is the data type of the widgetI resource types given by the third parameter. ItH  tells DECTPU how to process the resource types.B DECTPU supports the following data types:J "boolean", "callback", "char", "compound_string",A "compound_string_table", "int", "short",? "unsigned_short", and "unsigned_char".J widget_resource_type A series of names of widget resources or resourceI types that are of the data type specified by theG  second parameter. You can specify an array ofK strings, or a comma separated list of strings. IfG you use an array, you index the array with anyH valid DECTPU array indexes. The array elementsJ contain the names of either widget resources (forG example, "dialogStyle"), or of widget resourceH types (for example, "Int"). If you use a commaG  separated list of strings, the strings are theI names of the widget resources or resource types. Example? The following statement enables your application to use theK "dialogStyle" resource of the Motif XmBulletinBoard widget, which is anH unsigned_char data type. "dialogStyle" is the name of the resource:? SET (WIDGET_RESOURCE_TYPES, "unsigned_char", "dialogStyle")wwׅ<; 1 SET(WIDTH) SET(WIDTH)I Sets the width of a window. If a window is wider than the screen and ifK the window contains text off the right edge of the screen, DECTPU displaysH a diamond symbol in the rightmost column on the screen as a signal that there is undisplayed text. Syntax1 SET (WIDTH, {window | ALL | SCREEN}, integer) ParametersH window The window for which you want to set or change the width.I ALL A keyword indicating that DECTPU should set the screen andJ all  windows, visible and invisible, to the specified width.H SCREEN A keyword indicating that DECTPU should set the screen toJ the specified width without altering the size of any DECTPUG windows. Note, however, that by default EVE resizes theI windows to match the width of the screen. Note, too, thatG you cannot set the screen to be narrower than the widest DECTPU window.G integer The width of the window in columns. You can specify anyI integer between 1 and 255. Values of 80 and 132 cause theI terminal to switch between 80-column and 132-column modes.C By default, the width of a window is the same as theI physical width of the terminal when the window is created. Examples" SET (WIDTH, main_window, 132);2 Sets the width of the main window to 132 columns. SET (WIDTH, ALL, 40);K Sets the width of the screen and all windows, visible and invisible, to 40 columns. Related Topics SET(HEIGHT)ww<;1 SHIFT SHIFTK Changes the relative position of text displayed in a window on the screen.I The character position displayed in column 1 on the screen is shifted toH right or left -- typically, to view text that is wider than the window.F The shift applies to any buffer associated with the window specified.? SHIFT optionally returns an integer (for use with other DECTPU  procedures). Syntax* [integer2 :=] SHIFT (window, integer1) Parameters9 window The window in which the shift is to occur.H integer1 The number of columns to shift the text. Positive valuesG shift from right to left (so you can see text beyond theK right edge of the window). Negative values are from left toI right (so you can can see text beyond the left edge of theG window). If you specify 0, no shift takes place and theA screen is not repainted. Otherwise, the screen isH repainted. If the first character in the line of text isI already in column 1, using a negative value has no effect. Examples 1. SHIFT (main_window, +5);C Shifts text displayed in main window five columns to the left. 2. SHIFT (main_window, -5);K Shifts text displayed in the main window five columns to the right, as. long as existing text is beyond column 1.ww<;1 SHOW SHOWJ Shows information about a datatype, keyword, or current settings that can be applied to some datatypes. Syntax SHOW ({datatype | keyword} ParametersI datatype The variable to which a DECTPU datatype is assigned to getE information on a particular item. You can use buffer,K string, and window datatypes. keyword One of the following:C BUFFER[S] To show informat ion about all buffers6 available to the editor.G KEY_MAP_LIST[S] To show the names of all defined key-mapK lists, their key maps, and the number of keys6 defined in each key map.H KEY_MAP[S] To show the names of all defined key maps.G KEYWORDS To show all items in the internal keyword$ table.J PROCEDURE S To show the names of all defined procedures.E SCREEN To show information about the terminal.F SUMMARY To show statistics and other informationH about DECTPU including the current version% number.I VARIABLES To show the names of all defined variables.C WINDOW[S] To show information about all windows6 available to the editor.K buffer To show information about the buffer variable* you specify.K string To show information about the string variable* you specify.K window To show information about the window variable* you specify. Examples 1. SHOW (PROCEDURES);K Shows, on the screen, a list of all DECTPU built-ins and user-written, compiled procedures. 2. SHOW (CURRENT_BUFFER);H Shows, on the screen, information about the current buffer, such asF the input file associated with the buffer (if any), the number ofI lines in the buffer, its margins, and the number of windows to which the buffer is mapped. Related topics" EXPAND_NAME GET_INFO SETww<;1 SLEEP SLEEPF Causes DECTPU to pause for the amount of time specified. SLEEP isE useful for suspending screen action while a message is displayed. Syntax SLEEP ({integer | string}) ParametersE integer The number of seconds for which DECTPU is to pause.E string A delta or absolute time indicating how longI DECTPU is to pause. The delta string must be inH the format "dddd hh:mm:ss.cc" where dddd is theK number of days (0-9999), hh is the nu mber of hoursJ (0-23), mm is the number of minutes (0-59), ss isK the number of seconds (0-59), and cc is the number: of hundredths of a second (0-99).B The absolute string must be in the formatK "dd-mmm-yyyy hh::mm::ss.cc" where dd is the day ofI the month (1-31), mmm is the month (for example,@ JAN), and yyyy is the year (1858-9999). CommentsJ User input overrides the SLEEP built-in. If typed-ahead user input isH pending when DECTPU encounters SLEEP, DECTPU does not pause. If the? user types in input during a pause, DECTPU stops the SLEEP. ExamplesG 1. The following statement causes DECTPU to pause for two seconds. SLEEP (2);K 2. The following statement causes DECTPU to pause for one and one half seconds: 3. SLEEP ("0 0:0:1.50");ww<;1 SPAN SPANA Creates a pattern matching the longest string containing only; characters from the specified string, range, or buffer. SyntaxG pattern := SPAN ({string | range | buffer} [, {FORWARD | REVERSE}]) ParametersJ string A string containing the characters that DECTPU is7 to match in the searched text.I range A range containing the characters that DECTPU is7 to match in the searched text.J buffer A buffer containing the characters that DECTPU is7 to match in the searched text.J FORWARD A keyword directing DECTPU to match characters in/ the forward direction.J REVERSE A keyword directing DECTPU to match characters asI follows: First, match characters in the forwardI direction until DECTPU finds a character that isE not a member of the set of characters in theJ specified buffer, range, or string. Next, returnK to the first character that SPAN matched and startK matching characters in the reverse direction untilF DECTPU finds a character not in the specifiedK buffer, range, or string. You can specify REVERSEK only if y ou are using SPAN in the first element ofF a pattern being used in a reverse search. InJ other contexts, specifying REVERSE has no effect.B The behavior enabled by REVERSE allows anI alternate form of reverse search. By default, aK reverse search stops as soon as a successful matchG occurs, even if there might have been a longerG  successful match in the reverse direction. ByH specifying REVERSE with SPAN, you direct DECTPUJ not to stop matching in either direction until itD has matched as many characters as possible. CommentsI SPAN matches one or more characters, each of which must appear in theI string, range, or buffer passed as the first parameter. SPAN matchesI as many characters as possible, stopping only if it finds a characterI not present in the string, range, or buffer, or if it reaches the endH of a line. SPAN does not cross line boundaries. To match a pattern: that may cross one or more line boundaries, use SPANL. Examples$ 1. pat1 := SPAN ("1234567890");J Creates a pattern matching any sequence of numerals and any number) of contiguous digits on one line.- 2. pat1 := SPAN ("1234567890", FORWARD);@ This statement has exactly the same effect  as Example 1.2 3. vowel_pattern := SPAN ('aeiouy', REVERSE);G This statement defines the variable "vowel_pattern" to mean theI longest string of characters that are all vowels. If you use the following statement:5 the_range := SEARCH (vowel_pattern, REVERSE);E when the cursor is on the "a" in the word "liaison", then theH variable "the_range" contains the string "iai". This is becauseI when you use SPAN with REVERSE as the fi rst element of a pattern,K and then use that pattern in a reverse search, SPAN matches as manyJ characters as possible in both the forward and reverse directions.? If the cursor is on the "a" but you define the variable? "vowel_pattern" without the REVERSE keyword, like this:) vowel_pattern := SCAN ('aeiouy');K and then do a reverse search, "the_range" contains the string "ai",K showing that the search matched from the starting point forward butG did not return to the starting point to match backward as well. Related TopicsC ANCHOR ANY ARB MATCH NOTANY SCAN< SCANL SEARCH SEARCH_QUIETLY SPANL UNANCHORww<;1 SPANL SPANLE Creates a pattern matching the longest possible string containingE characters that are in the specified string, range, or buffer. AE pattern created with SPANL can match text containing line breaks. SyntaxH pattern := SPANL ({string | range | buffer} [, {FORWARD | REVERSE}]) ParametersJ string A string containing the characters that DECTPU is7 to match in the searched text.I range A range containing the characters that DECTPU is7 to match in the searched text.J buffer A buffer containing the characters that DECTPU is7 to match in the searched te xt.J FORWARD A keyword directing DECTPU to match characters in/ the forward direction.J REVERSE A keyword directing DECTPU to match characters asI follows: First, match characters in the forwardI direction until DECTPU finds a character that isE not a member of the set of characters in theJ specified buffer, range, or string. Next, returnF to the first character that SPANL matched andG start matching characters and line ends in theI reverse direction until DECTPU finds a characterG not in the specified buffer, range, or string.F You can specify REVERSE only if you are usingK SPANL in the first element of a pattern being usedA in a reverse search. In othe r contexts,: specifying REVERSE has no effect.B The behavior enabled by REVERSE allows anI alternate form of reverse search. By default, aK reverse search stops as soon as a successful matchG occurs, even if there might have been a longerG successful match in the reverse direction. ByI specifying REVERSE with SPANL, you direct DECTPUJ not to stop matching in either direction until itD has matched as many characters as possible. CommentsJ SPANL matches one or more characters, each of which must appear in theJ string, range, or buffer passed as the parameter, and one or more lineI breaks. To match one or more line breaks and nothing else, specify a( null string as a parameter to SPANL. Examples% 1. pat1 := SPANL ("1234567890");H Creates a pattern matching any number and sequence of contiguous$ digits on one or more lines.. 2. pat1 := SPANL ("1234567890", FORWARD);@ This statement has exactly the same effect as Example 1. 3. pat1 := SPANL (" ");D Stores a pattern in the variable "pat1" matching the longestF sequence of blank characters starting at the current character> position and continuing to an end-of-search condition.3 4. vowel_pattern := SPANL ('a eiouy', REVERSE);G This statement defines the variable "vowel_pattern" to mean theI longest string of characters that are all vowels. If you use the following statement:5 the_range := SEARCH (vowel_pattern, REVERSE);E when the cursor is on the "a" in the word "liaison", then theH variable "the_range" contains the string "iai". This is becauseJ when you use SPANL with REVERSE as the first element of a pattern,K and then use t hat pattern in a reverse search, SPAN matches as manyJ characters as possible in both the forward and reverse directions.? If the cursor is on the "a" but you define the variable? "vowel_pattern" without the REVERSE keyword, like this:) vowel_pattern := SCAN ('aeiouy');K and then do a reverse search, "the_range" contains the string "ai",K showing that the search matched from the starting point forward butG did not return to the starting point to match backward as well. Related TopicsC ANCHOR ANY ARB MATCH NOTANY SCAN< SCANL SEARCH SEARCH_QUIETLY SPAN UNANCHORww<;1 SPAWN SPAWN> Creates a subprocess running the command line interpreter. Syntax" SPAWN [(string) [,{OFF | ON}]] ParametersH string The command that you want to send to the subprocess. TheF command is is executed after the subprocess is cr eated.E When the command is completed, the subprocess ends and5 control returns to the DECTPU process.K ON Specifies that control is to be returned to DECTPU after theI subprocess has terminated. This is the default unless the: null string is used as the first parameter.K OFF Specifies that control is to be left at the DCL prompt afterI the subprocess has terminated. This is the default if the: null string is used as the first parameter. CommentsE If you do NOT specify a command for the subprocess, return to theD DECTPU process by using the DCL ATTACH command or the DCL LOGOUTF command. With ATTACH, the subprocess is available for future use.+ With LOGOUT, the subprocess is deleted. Example SPAWN ("DIRECTORY");I Spawns a VMS subprocess and executes the DCL DIRECTORY command. When@ the command is completed, you return to your DECTPU session. Related topics- ATTACH CREATE_PROCESS SEND SEND_EOFww<; 1 SPLIT_LINE SPLIT_LINEE Breaks the current line at the active editing point, creating two lines. ExampleG The following procedure inserts two lines of text and a blank line: PROCEDURE user_memo_heading1 COPY_TEXT ("Interoffice Memo"); ! line 1 SPLIT_LINE;1 COPY_TEXT ("Date: "); ! line 2 SPLIT_LINE;C SPLIT_LINE; ! blank line after heading ENDPROCEDURE; Related topics0 COPY_TEXT CURRENT_CHARACTER CURRENT_LINEww<;1 STR STRI This built-in has two variants. One variant returns a string equivalentJ for an integer, keyword, or string. The other variant returns the string2 equivalent for the contents of a range or buffer. Syntax 1+ string1 := STR ({integer1 [, integer2]} {keyword} {string2} )I Returns the string equivalent for the integer, keyword, or string you specify. ParametersD integer1 The integer you want converted to a string.E integer2 The radix (base) you want DECTPU to use whenK converting integer1 to a string. Allowable valuesJ are 8, 10, and 16. The default radix is 10. YouK can use integer2 only if you specify an integer as-  the first parameter.J keyword The keyword whose string representation you want.J string2 A string you want returned. This built-in allows4 a parameter of type string. Syntax 2A string1 := STR ({range | buffer} [ [,string2] {, ON | OFF}] ) ParametersF range A range whose contents you want returned as a string.G buffer A buffer whose co ntents you want returned as a string.H string2 Specifies how you want line breaks represented.H The default is the null character. You can useI string2 only if you specify a range or buffer asF the first parameter. Every line break in theF buffer or range is replaced by the string youI specify. The end of the last line in the buf ferC or range is not replaced by the string you! specify.G ON A keyword directing DECTPU to insert spaces toI preserve the white space created by left marginsE greater than one in the buffer or range. NoJ spaces are inserted for lines that do not containD characters. Integer 1 is equivalent to the$  keywork ON.J OFF A keyword directing DECTPU to ignore left marginsI when converting the buffer or range to a string.D Integer 0 is equivalent to the keywork OFF. ExamplesI 1. The following procedure converts two integer variables to strings soE the current column and row can be displayed in the message area:$ PROCEDURE user_display_positionA what_col := GET_INFO (current_window, "current_column");> what_row := GET_INFO (current_window, "current_row");J MESSAGE ("Column " + STR (what_col) + ", Row " + STR (what_row)); ENDPROCEDURE;G 2. The following statement forms a string using the text in the rangeJ "this_range"; in the string, each end of line is represented with the string "":4 this_string := STR (this_range, "");@ For example, if the text in "this_range" was the following: You make the best of What's still around4 then "this_string" would contain the following:7 You make the best ofWhat's still around Related topics! ASCII FAO INT SUBSTRww<;1 SUBSTR SUBSTRF Returns a string representing a substring of the specified buffer, range, or string. SyntaxH string2 := SUBSTR ({buffer | range | string}, integer1 [, integer2]) Parameters1 buffer A buffer containing the substring.0 range A range containing the substring.1 string1 A string containing the substring.I integer1 The character position at which the substring starts. The- first character position is 1.H integer2 The number of characters to include in the substring. IfA you do not specify this parameter, DECTPU sets theH substring's end point at the end of the specified buffer, range, or string. Example, file_type := S UBSTR ("login.com", 6, 4);G Returns in the variable FILE_TYPE the string ".com": the substringF starts at the sixth character position (the period) and contains 4D characters (.com). If you use a larger number for integer2 (forJ example, if you use 10), the contents of the variable are the same andH no error is signaled. If you omit the last parameter (in this case,J the 4), DECTPU sets the substring's end point at the end of the string "login.com". Related topics ASCII FAO INT STRww<; 1 TRANSLATE TRANSLATEH Substitutes one set of specified characters for another set in text.B Invokes the RTL procedure STR$TRANSLATE to replace one or moreK characters. For more information, see the VMS System Routines volumes.I Optionally, returns a string, range, or buffer containing the changed text. Syntax [returned_buffer | returned_range |I returned_string := ] TRANSLATE (buffer  | range | string1}, string2,A string3 [, {IN_PLACE | NOT_IN_PLACE}]) ParametersI buffer A buffer in which one or more characters are to beF replaced. Note that you cannot use the keywordI NOT_IN_PLACE if you specify a buffer for the first! parameter.H range A range in which one or more characters are to beF replaced. Note that you cann ot use the keywordH NOT_IN_PLACE if you specify a range for the first! parameter.I string1 A string in which one or more characters are to beE replaced. If a return value is specified, theH substitution is performed in the returned string.G If you specify IN_PLACE for the third parameter,I TRANSLATE makes the specified change to the stringJ  specified in the first parameter. TRANSLATE has no2 effect on string constants.< string2 The string of replacement characters.J string3 The literal characters within the text specified by: parameter1 that are to be replaced.G IN_PLACE A keyword directing DECTPU to make the indicatedH change in the buffer, range, or string specified.+ This is the default.H NOT_IN_PLACE A keyword directing DECTPU to leave the specifiedG string unchanged and return a string that is theK result of the specified translation. You cannot useJ NOT_IN_PLACE if the first parameter is specified asH a range or buffer. To use NOT_IN_PLACE, you must< specify a return value for TRANSLATE.G returned_buffer A variable of type buff er pointing to the bufferE containing the modified text, if you specify aD buffer for the first parameter. The variableJ "returned_buffer" points to the same buffer pointedG to by the buffer variable specified as the first! parameter.K returned_range A range containing the modified text, if you specifyG a range for first parameter. The returned rang eF spans the same text as the range specified as aK parameter, but they are two separate ranges. If youG subsequently change or delete one of the ranges,= this has no effect on the other range.D returned_string A string containing the modified text, if you@ specify a string for the first parameter. CommentsJ TRANSLATE searches the text specified by parameter1 for the charactersI specified by parameter3. When a character specified by parameter3 isC found, the character at the same string offset in parameter2 is substituted into the text. Examples* 1. TRANSLATE (main_buffer, "X", "x");I Replaces all lowercase x's in the main buffer with uppercase X's.K 2. The following statements show how the word "darn" could be replacedI with "da*n" during an interactive session. Suppose the followingK text is written in a buffer and that the variable "the_range" spans this text:7 This darned wind is a darned nuisance, darn it!I The following statement assigns to "the_string" the characters in "the_range":% the_string := STR (the_range)G The following statement assigns to "translated_string" the textB that results when an asterisk is substituted for each "r":K translated_string := TRANSLATE (the_string, "*", "r", NOT_IN_PLACE)J The variable "translated_string" then contains the following text:7 This da*ned wind is a da*ned nuisance, da*n it!K Note that if the text contained other r's, they would also replaced by asterisks.ww"=; 1 UNANCHOR UNANCHORI Specifies that a search may match a pattern at any position after the current position.A UNANCHOR is a keyword, not a built-in. It has no parameters.I If a pattern contains two or morL\SET(WIDGET_RESOURCE_TYPES) SET(WIDTH)jSHIFTSHOW|SLEEPSPANSPANLSPAWN` SPLIT_LINESTRSUBSTR TPU0 TRANSLATEUNANCHORD UNDEFINE_KEYhUNMANAGE_WIDGET*UNMAPUPDATEWRITE_CLIPBOARD WRITE_FILEWRITE_GLOBAL_SELECT e pattern elements joined by the plusD sign (+) sign or the ampersand (&), by default a search for thatD pattern is an anchored search. That is, the search successfullyK matches the pattern only if all elements of the pattern occur one rightH after the other, with no intervening characters that are not part ofE the pattern. To override the default, use UNANCHOR. You can use. UNANCHOR anywhere in a pattern definition. Example1 pat1 := "a" + UNANCHOR + "123" + ANY ("XYZ");I This statement creates a pattern that matches any text beginning withE the letter "a" and ending with "123" followed by X, Y, or Z. AnyI amount of text, including line breaks, may appear between the "a" and the "123." Related Topics$ ANCHOR SEARCH SEARCH_QUIETLYww"=;1 UNDEFINE_KEY UNDEFINE_KEY9 Removes the current binding from the key you specify. Syntax$ UNDEFINE_KEY (keyname [,string]) ParametersK keyname Specifies the key (or key combination) you want to undefine., (See help on KEYNAMES TABLE.)G string A key map or a key-map list in which the key is defined.K The first definition of the key in the key maps that make upG the key-map list is deleted. If neither a key map nor aK key-map list is specified, the key-map list bound to the the& current buffer is used. Examples" 1. UNDEFINE_KEY (CTRL_Z_KEY);A Undefines CTRL/Z (the combination of the CTRL key and the letter Z).1 2. UNDEFINE_KEY (KEY_NAME ("r", SHIFT_KEY));K Undefines the combination of the DECTPU shift key (by default, PF1) and the letter R. Related topics> DEFINE_KEY KEYNAMES TABLE NONDEFINABLE KEYS SHIFT_KEYww"=;1 UNMANAGE_WIDGET UNMANAGE_WIDGETI Removes the specified widget instance from the management of its parent.A This causes the specified widget instance's parent to stop beingF responsible for determining the widget's space requirements. It alsoK stops the parent's determination of the widget's visibility, if the parent ever did determine visibility. Syntax* UNMANAGE_WIDGET (widget [, widget...]) ParametersB widget The widget instance you want to unmanage. CommentsB MANAGE_WIDGET performs the same functions as XtUnmanageWidget. ExampleI The following statement unmanages the widget instance assigned to the variable "sample_x_keypad":$ MANAGE_WIDGET (sample_x_keypad); Related Topics8 CREATE_WIDGET DELETE GET_INFO(WIDGET_VARIABLE)- MANAGE_WIDGET MAP REALIZE_WIDGET$ SET(MAPPED_WHEN_MANAGED) UNMAPww"=;1 UNMAP UNMAP@ Performs either of two functions depending on the variant used.J One variant disassociates a window from its buffer and removes the window from the screen.8 The other variant makes the specified widget invisible. Syntax UNMAP (window) or UNMAP (widget) Parameters, window The window you want to unmap.> widget The widget instance you want to make invisible. CommentsD When you are using the first variant, which unmaps a window, theJ unmapped window is not deleted from the list of available windows. ToI make the window appear on the screen again, use MAP. The screen areaF of the unm apped window is either erased or returned to any windows$ occluded by the unmapped window.D If you unmap the current window, DECTPU tries to move the cursorJ position to the window that was most recently the current window. TheI window in which DECTPU puts the cursor becomes the new current windowF and the buffer associated with this window becomes the new current buffer.I The UNMAP (widget) variant calls the Xlib routine MAP WINDOW to unmapD the widget's DECwindows window from the screen. If the unmappedE DECwindows window is DECTPU's top-level DECwindows window, DECTPUK automatically maps the top-level window again if a READ_CHAR, READ_KEY,; or READ_LINE statement is encountered during execution. Examples UNMAP (CURRENT_WINDOW);K Removes the current window from the screen and disassociates the buffer that was mapped to it. UNMAP (example_widget);K Causes the widget instance assigned to the variable "example_widget" to become invisible. Related topics< CREATE_WIDGET CURRENT_BUFFER CURRENT_WINDOW DELETE3 MAP MANAGE_WIDGET REALIZE_WIDGET4 SET(MAPPED_WHEN_MANAGED) UNMANAGE_WIDGETww"=;1 UPDATE UPDATEK Causes the screen manager to make a window reflect the current state ofH the buffer that is mapped to the window. The screen manager updatesI windows after each keystroke. This means that if a key is bound to aK procedure, several built-ins may be executed before the screen actuallyI reflects the internal state of the buffer. If you want the screen toJ reflect changes before the entire procedure is executed, you can forceG an immediate update by adding an UPDATE statement to the procedure. Syntax UPDATE ({window | ALL}) ParametersK window The window that you want updated. The window must< be visible for the update to occur.E ALL Specifies that all visible windows are to beD updated to reflect the current state of the0 buffers mapped to them. Example UPDATE (new_window);K This statement causes the screen manager to make the new window reflectI the current internal state of the buffer associated with that window. Related Topics REFRESHww"=;1 WRITE_CLIPBOARD WRITE_CLIPBOARD, Writes STRING format data to the clipboard. Syntax@ WRITE_CLIPBOARD (clipboard_label, {buffer | range | string}) ParametersI clipboard_label The label for multiple entries in the clipboard.G Since the clipboard does not currently supportK multiple labels, use any string including the null: string to specify this parameter.H buffer The buffer containing text to be written to theG  clipboard. DECTPU represents line breaks by aK line-feed character (ASCII (10)). The buffer mustJ contain at least one character or line break. IfH it does not, DECTPU signals TPU$_CLIPBOARDZERO.G range The range containing text to be written to theF clipboard. DECTPU represent line breaks by aJ line-feed character (ASCII (10)). The range mustJ contain at least one character or line break. IfH it does not, DECTPU signals TPU$_CLIPBOARDZERO.H string The string containing text to be written to theI clipboard. The string must contain at least oneC character. If it does not, DECTPU signals, TPU$_CLIPBOARDZERO.ww'I=; 1 WRITE_FILE WRITE_FILEG Writes the contents of a buffer or range to a specified file or to theH output file associated with the buffer; optionally returns a string for the output file specification. SyntaxG [string2 :=] WRITE_FILE ({buffer|range} [,string1] [, {ON|OFF|1|0}) ParametersJ buffer The buffer whose contents you want to write to a file.I range The range whose contents you want to write to a file.K string1 The output file specification. If you do not specify aI  file, DECTPU uses the output file associated with theJ buffer. If there is no associated output file, DECTPU$ prompts for one.K ON or 1 The output will be padded with spaces to keep the firstK character of each record at the same column as the text> in the buffer. By default, padding is ON.J OFF or 0 No padding spaces will be inserted when writing to the file. ExamplesG All examples assume a buffer with the following text. Each line has aJ left margin of 6. The select range runs from the '1' to the first 'i' in line 3. This is line 1 This is line 2 This is line 3/ 1. WRITE_FILE (CURRENT_BUFFER, "myfile.txt");F Writes out the current buffer to a file called MYFILE.TXT in yourK current (default) directory. Each record in the file will be preceded? by five spaces to keep the 'T' in each record in column 6.> 2. out_file := WRITE_FILE (select_range, "myfile.txt", OFF);D Stores in the variable OUT_FILE the file specification used forI writing out the select range. The file contains the following text: 1 This is line 2 ThiA 3. WRITE_FILE (select_range, READ_LINE ("Output file: "), ON);I Writes out the select range to a file, using READ_LINE to prompt forI the output file specification. The lines are padded, so the text in the file is: 1 This is line 2 Thi Related topics> EXIT QUIT READ_FILE SET(NO_WRITE) SET(OUTPUT_FILE)ww'I=;1 WRITE_GLOBAL_SELECT WRITE_GLOBAL_SELECTE Sends requested information about a global selection from the DECTPUC layered application to the application that issued the information request. SyntaxL WRITE_GLOBAL_SELECT ({array | buffer | range | string | integer | NONE}) ParametersD array An array passing information about a globalK selection whose contents describe information thatH is not of a data type supported by DECTPU. ForJ example, the array could pass information about aJ pixmap, an icon, or a span. For more informationJ about the contents of the returned array, see the= documentation for DECwindows DECTPU. I buffer The buffer containing the information to be sentI to the requesting application as the response toJ the global selection information request. DECTPU@ sends the information in string format.K range The range containing the information to be sent toJ the requesting application as the response to theF global selection information request. DECTPU@ sends the information in string format.I string The string containing the information to be sentI to the requesting application as the response toJ the global selection information request. DECTPU@ sends the information in string format.D integer An integer whose value is to be sent to theK requesting as the response to  the global selectionK information request. DECTPU sends the information+ in integer format.K NONE A keyword indicating that no information about the7 global selection is available. CommentsG WRITE_GLOBAL_SELECT is valid only inside a routine that responds to< requests for information about a global selection. CallJ WRITE_GLOBAL_SELECT no more than once during the execution of a global selection read routine. ExampleK The following statement sends the contents of the range "this_range" to the requesting application.% WRITE_GLOBAL_SELECT (this_range);ww