% Librarian I01-42q6 %5 OLLABORTMf ADD_KEY_MAPP ADJUST_WINDOWSANCHORVANYWANYLX APPEND_LINEYARBZASCII^ATTACH`d BEGINNING_OFBOOLEAN_EXPRESSIONSa CALL_USERb CHANGE_CASECommandsjCOMPILEm8CONVERTs COPY_TEXTw CREATE_ARRAY{ CREATE_BUFFER|CREATE_KEY_MAPCREATE_KEY_MAP_LISTDEBUGGER'ERROR_HANDLERS,KEYMAPS_AND_KEYMAP_LISTS9Keynames_Table?:Nondefinable_KeysDRecovery TPUaCREATE_KEY_MAP_LISTCREATE_PROCESS CREATE_RANGE CREATE_WIDGET> CREATE_WINDOWCURRENT_BUFFERCURRENT_CHARACTERCURRENT_COLUMNlCURRENT_DIRECTION CURRENT_LINECURRENT_OFFSET CURRENT_ROWCURRENT_WINDOW2CURSOR_HORIZONTALCURSOR_VERTICALDEBUGGER DEBUG_LINEH DEFINE_KEY'ERROR_HANDLERS,KEYMAPS_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)KSET(SHIFT_KEY)SET(WIDGET_CONTEXT_HELP)WRITE_GLOBAL_SELECTgH DEFINE_KEY6DEFINE_WIDGET_CLASSDELETEEDITEND_OFERASE2ERASE_CHARACTERF ERASE_LINEJERROR'ERROR_HANDLERS. ERROR_LINE< ERROR_TEXTEXECUTEEXIT EXPAND_NAMEFAO FILE_PARSE FILE_SEARCH>FILL GET_CLIPBOARD GET_DEFAULTGET_GLOBAL_SELECT"GET_INFO,KEYMAPS_AND_KEYMAP_LISTS9Keynames_Table?:Nondefinable_KeysDRecovery TPUU"GET_INFOVGET_INFO(ANY_KEYNAME)BGET_INFO(ANY_KEYWORD)GET_INFO(ANY_VARIABLE) GET_INFO(ARRAY) .GET_INFO(ARRAY_VARIABLE)GET_INFO(BUFFER)tGET_INFO(BUFFER_VARIABLE))vGET_INFO(COMMAND_LINE)3GET_INFO(DEBUG)8GET_INFO(DEFINED_KEY);GET_INFO(GLOBAL_SELECT)=GET_INFO(KEY_MAP)@GET_INFO(KEY_MAP_LIST),KEYMAPS_AND_KEYMAP_LISTS9Keynames_Table?:Nondefinable_KeysDRecovery TPUY@GET_INFO(KEY_MAP_LIST)B GET_INFO(MARKER_VARIABLE)HbGET_INFO(MOUSE_EVENT_KEYWORD)LGET_INFO(PROCEDURES)OGET_INFO(PROCESS)RGET_INFO(PROCESS_VARIABLE)SGET_INFO(RANGE_VARIABLE)UpGET_INFO(SCREEN)v"GET_INFO(STRING_VARIABLE)GET_INFO(SYSTEM)GET_INFO(WIDGET)GET_INFO(WIDGET_VARIABLE)GET_INFO(WINDOW),KEYMAPS_AND_KEYMAP_LISTS9Keynames_Table?:Nondefinable_KeysDRecovery TPU[GET_INFO(WINDOW)GET_INFO(WINDOW_VARIABLE) HELP_TEXTINDEXINTP JOURNAL_CLOSET JOURNAL_OPEN,KEYMAPS_AND_KEYMAP_LISTS9Keynames_TableKEY_NAMEvLAST_KEY4 LEARN_ABORT LEARN_BEGIN LEARN_ENDLENGTHB LINE_BEGINLINE_END LOCATE_MOUSEX LOOKUP_KEY LOWER_WIDGET MANAGE_WIDGETMAPJMARKMATCH?:Nondefinable_Keys2 RAISE_WIDGETDRecovery TPUd LOWER_WIDGET MANAGE_WIDGETMAPJMARKMATCHMESSAGE MESSAGE_TEXT  MODIFY_RANGE(MOVE_HORIZONTALR MOVE_TEXT( MOVE_VERTICAL?:Nondefinable_KeysNOTANY NOTANYL!POSITION)QUIT2 RAISE_WIDGET, READ_CHAR/NREAD_CLIPBOARD2n READ_FILE4fREAD_GLOBAL_SELECT:\READ_KEY< READ_LINE@ZREALIZE_WIDGETDRecoveryBRRECOVER_BUFFERLHREFRESHMtREMAIN TPU[:\READ_KEY< READ_LINE@ZREALIZE_WIDGETDRecoveryBRRECOVER_BUFFERLHREFRESHMtREMAINNrREMOVE_KEY_MAPQ RETURNUSAVE[2SCANc2SCANLlSCROLLpSEARCHxSEARCH_QUIETLYSELECT SELECT_RANGESENDSEND_CLIENT_MESSAGESEND_EOFSETSET(ACTIVE_AREA)SET(AUTO_REPEAT)d SET(BELL)SET(CLIENT_MESSAGE)SET(COLUMN_MOVE_VERTICAL)DSET(CROSS_WINDOW_BOUNDS) TPU 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 +-------------------------------------------------------------------------+ww 1 Commands List of TopicsC For help on TPU 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(DEFINED _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(PA D): 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(GL OBAL_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(INFORMATIONA L) 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(WI DGET)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 Listsww1 BOOLEAN_EXPRESSIONS BOOLEAN EXPRESSIONSD In TPU, 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.F TPU evaluates Boolean expressions by performing logical operations onD the operands one bit at a time. For example, if TPU 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 AN D 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.H When executing a Boolean expression, TPU 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 1 DEBUGGER DEBUGGER5 TPU provides a debugger called TPU$DEBUG , stored inB SYS$SHARE:TPU$DEBUG.TPU, or you can use a debug file of your own.G To invoke TPU with the debugger, use /DEBUG and optionally specify theG deb ug file you want to use. TPU 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.B When you use TPU$DEBUG.TPU, TPU 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 breakpoint 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 ofA execution from the debugger program to TPU. 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 debugger 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.F When TPU 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 source buffer.I Once you have s"et 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 scr%oll 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 specified. 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 c'olumns 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.) STEPH Executes one line of TPU code, then returns control to the debugger.F If you have several TPU statements on one line, all statements are4 executed before control re(turns to the debugger. TPU statement? Executes the TPU statement you specify. (See help on TPU.) Related Topics DEBUG_LINE SET(DEBUG)ww1 ERROR_HANDLERS Error HandlersI An error handler is a block of code containing statements to be executedE if TPU 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).C TPU 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 recursive. Types of Error Handlers in TPUF* TPU 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); RETURN (LEARN_ABORT); [OTHERWISE]: MES+SAGE( ERROR_TEXT); RETURN; ENDON_ERRORC Case-style error handlers are similar to TPU 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:0 o TPU keywords indentifying errors or warnings o The keyword OTHERWISE9 Case-style error handlers allow you to do the follo,wing:! 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 VSI Text Processing Utility Manual. Related Topics? CALL_USER ERROR ERROR_LINE ERROR_TEXT LEARN_ABORT8 MESSAGE MESSAGE_FLAGS MESSA -GE_TEXT RETURNww1 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.G A key map is a set of key definitions. TPU 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 specifyG o Additional information specifying how TPU should respond to the user's keystrokesH TPU supplies a default key map list called TPU$KEY_MAP_LIST. T /o 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 keystrokes in different ways. For example, suppose you had an applicat 0ionE 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 whether the mapI is added to the beginning or the end of the list. 1When 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 when the user presses aF key. To have an effect, a key-map list m 2ust 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 default key mapI list, TPU$KEY_MAP_LIST. To change the key-map list t 3o 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.D When the user presses a key, TPU uses the information stored in theG key 4-map list bound to the current buffer to determine what to do. The7 order in which TPU uses the information is as follows:E 1. TPU determines whether the key pressed is the "shift" key (orK GOLD key). If so, no action is taken until another key is pressed.E 2. If the key is not the "shift" key, TPU checks the key maps toE see if the key is defined. TPU looks through the key maps inB order and uses the first definition of a given key that it enco 5unters.E 3. If the key is defined, TPU checks whether a pre-key executionG procedure has been stored in the key-map list by use of the SETA (PRE_KEY_PROCEDURE...) built-in. If so, TPU executes theH procedure. Next, TPU executes the code bound to the key. AfterD executing that code, TPU checks whether a post-key executionK procedure has been stored in the key-map list. If so, the post-key( execution procedure is executed.H 4. If the 6 key is not defined, TPU 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. IfC SELF_INSERT is set to ON, TPU displays the character on theH screen. If SELF_INSERT is set to OFF, TPU takes whatever action< is specified by the SET (UNDEFINED_KEY...) built-in.G 5. If the key is not for a printable character and is not defined,9 TPU take 7s 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 about) EVE usage of key maps and key-map lists:J o In EVE, the name of a key map is not the s 8ame 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 standard EVE section file.D o The order of key maps in the EVE key map list depends on9 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 TopicsC ADD_KEY_MAP CREATE_KEY_MAP CREATE_KEY_MAP_LIST> DEFINE_KEY GE:T_INFO REMOVE_KEY_MAPG SET(KEY_MAP_LIST) SET(PRE_KEY_PROCEDURE) SET(POST_KEY_PROCEDURE)4 SET(SELF_INSERT) SET(UNDEFINED_KEY) SHOWww1 Keynames_Table Keynames TableE The following tables show TPU keynames for the corresponding keys on& the LK201 and VT100-series keyboards:2 TPU 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 arr<ow. 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,...,F20 F6,...,F20F Note: Keys F1 through F5 are reserved by the operating system and= canno=t be defined. See help on NONDEFINABLE KEYS.+ TPU Keynames for Keys on the Main Keyboard. =============================================( Keyboard marking- Keyname LK201 VT100-series- -----------------------------------------$ TAB_KEY Tab TAB' RET_KEY Return RETURN' DEL_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+ letter A (upper- or lower-case). TPU Keynames for Mouse Keys ==============================G Each key o?n 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_KEYww1 Nondefinable_Keys Nondefinable KeysJ You can define all keys on the LK201 and VT100-series keyboards -- except the following:I BREAK COMPOSE CHARACTER C ATRL (by itself) LOCK or CAPS LOCK* HOLD SCREEN SET-UP SHIFTC On the LK401 keyboard you also cannot define the ALT FUNCTION key.G While TPU does not prevent you from defining keys F1 through F5 or the= ESCAPE key, the code bound to these keys cannot be executed.H The PF1 key is the default TPU shift key. You cannot define PF1 unless> you specify a different shift key by using SET(SHIFT_KEY...).C You can define and execute the following keys using the DECwindowsH B 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 must have entered the DCL command1 SET TERMINAL/PASTHRU.F CTRL/T and CTRL/Y To e Cxecute 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 keys on a character-cellK terminal, you must have entered the DCL command2 D 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.E The EVE editor has the same restrictions as TPU, 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 keyG 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 deEfined. (For more, information, see EVE help on SET GOLD KEY.) Related topics6 DEFINE_KEY KEY_NAME KEYNAMES TABLE SHIFT_KEYww 1 Recovery RecoveryH If a system failure interrupts your editing session, you can usuallyH recover your work. TPU makes this recovery possible by allowing youK to record the keystrokes of your editing session in a keystroke journalI file, or changes made to buffers in buffer change journal files. YouK can Frecover 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.D o By default, TPU does not journal. The application layered on@ TPU is responsible for processing the /JOURNAL qualifier.I o In EVE, if you do not specify this qualifier, EVE does only bufferK change journaling. With this qualifier followed by a file name, GEVEI 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 o If you do not want any journaling, use /NOJOURNAL.H o To turn on keystroke journaling during an editing session (eitherJ H 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@ (JOURNALING) built-in to adjust the journaling frequency.K o Normally, the journal file is deleted automatically when you exit I 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 were editing a file called JABBER.TXT, you# type the following DCL command:$ $ EDIT/TPU jabber.txt/RECOVERK Note t Jhat 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.A When you invoke TPU with the /RECOVER qualifier, TPU runs theJ journal file and recovers the edits you made up to the point where theH system failed. (The last few keystrokes or operations may be lost.)J You can then resume the editing session. Any Knew 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: o A CTRL/C sequence o A CTRL/T sequenceG o Cut and paste operation from a file accessed in a subprocess6 o L 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-in? It may be possible to edit a journal file, but VSI does notH recommend this because you may alter or delete information necessary for the recovery to work.H For more information, see DCL HELP on EDIT/TPU/JOURNAL and /RECOVER. RelaMted topics2 JOURNAL_CLOSE JOURNAL_OPEN SET(JOURNALING)ww 1 ABORT ABORTC Stops any executing procedures and causes TPU to wait for the next keypress.H ABORT is a TPU language construct, not a built-in procedure. ABORT hasC no parameters or completion codes. You cannot use the EXPAND_NAME built-in on ABORT. ExampleG The following error handler stops execution of any currently executing0 procedures and returns back to TPU's main loop: ONN_ERROR/ MESSAGE ("Aborting because of error."); ABORT; ENDON_ERRORww 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 list.K FIRST Specifies the key map is added to the beginning of* the key-map list.I LAST O 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 the order specified. The order of a key map inG a key-map list determines precedence among any5 conflicPting 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", help_keys); Related TopicsG ADD_KEY_MAP CREATE_KEY_MAP CREATE_KEY_MAP_LISTB DEFINE_KEY GET_INFO Q 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 Listsww 1 ADJUST_WINDOW ADJUST_WINDOWH Changes the window size or screen location (or both). ADJUST_WINDOWJ causes the "original_top" and "original_bottom" lines defined when theI window is created to be permanently modified, making the changed lineG numbers the new "original" valueR 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 window The window whose size or location you want to change. This* becomes the current window.G integer1 The signed (+|-) intege Sr 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 window 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 numbTerH 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.)ww 1 ANCHOR ANCHORI Causes a search to try to match the pattern following ANCHOR startingC at the current character position. If 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, U and has no parameters.D By default, if a search fails to find a match for a pattern, TPUC 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 for the search. This means the search will not matchJ the pattern unless the pattern is encountered starting at the starting position of the search.VK 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 from character to character looking for the pattern.! pat1 := ANCHOR + 'a' + '123'; Related Topics& SEARCH SEARCH_QUIETLY UNANCHORwwW 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$ characters.C range A range in which you want ANY to match any$ characters.D buffer AX 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-letter combinations: xx, xy, yx, and yy pat1 := ANY ('xy', 2); Related Topics1 NOTANY SEARCH SEARCH_QUIETLY SPAN SPANLww Y1 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.ww 1 APPEND_LINE APPEND_LINEJ Appends the current line to the end of the previous line. You can use+ APPEND_LINE to delete line terminators. Syntax APPEND_LINE Parameters none ExampleJ The followZing 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; ENDPROCEDURE; Related Topics SPLIT_LINE MOVE_TEXTww41 ARB ARBI Returns a pattern that matches an arbitrary sequence o[f 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 next 5 characters starting at the current character position.ww41 ASCII ASCIIJ Returns the character or symbol in the DEC Mul\tinational 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 value returned by the ASCII built-in if8 you specify a string parameter.H string1 The character returned by the ASCII b ]uilt-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 consisting ofH the form feed character (ASCII 12) to the variable MY_CHARACTER:# my_character := ASCII (12);G 2. The following assignment s_tatement 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_KEYww41 ATTACH ATTACHK Deassigns the terminal and switches cont`rol 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 switched.K Process names are case-sensitive. Put the string in quotes. Example ATTACH ("Joyce_2");5 Switches terminal control to tahe process Joyce_2. Related topics, CREATE_PROCESS SEND SEND_EOF SPAWNww41 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 character position goes to this marker. Syntax- marker := BEGINNING_OF ({buffer | range}) Example+ beg_main := BEGINNING_OF (main_buffer);bG This assignment statement stores the marker at the beginning of the) main buffer in the variable BEG_MAIN. Related Topics END_OF POSITION MARKww4 1 CALL_USER CALL_USER@ Calls a program written in another language from within TPU.J CALL_USER parameters are passed to the external program exactly as you5 enter them; TPU does not process them in any way. Syntax+ string2 := CALL_USER (integer, string1) ParametersG cinteger 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 VSI Text Processing Utility Manual.ww4 1 CHANGE_CASE CHANGE_CASEH Changes the 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 budffer 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]) PARAMETERSE buffer The buffer in which you want TPU to change theB case. Note that you cannot use the keywordI NOT_IN_PLACE if y eou specify a buffer for the first! parameter.D range The range in which you want TPU to change theB case. Note that you cannot use the keywordH NOT_IN_PLACE if you specify a range for the first! parameter.E string The string in which you want TPU to change theC case. If you specify IN_PLACE for the thirdK parameter, CHANGE f_CASE makes the specified change toC the string specified in the first parameter.E CHANGE_CASE has no effect on string constants.G LOWER A keyword directing TPU to change letters to all! lowercase.G UPPER A keyword directing TPU to change letters to all! uppercase.B INVERT A keyword directing TPU to change uppercaseE letters t go lowercase, and lowercase letters to! uppercase.D IN_PLACE A keyword directing TPU to make the indicatedH change in the buffer, range, or string specified.+ This is the default.E NOT_IN_PLACE A keyword directing TPU to leave the specifiedG string unchanged and return a string that is theJ result of the specified change in case. You cannotK h 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 the modified text, if you specify aD buffer for the first parameter. The variableJ "returned_buffer" points to the same buffer pointedG i 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,= tjhis 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 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 k(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 string pointed to byE "the_string", and returns the modified string in the variable "returned_value". Related Topic EDIT TRANSLATEww4 l 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 bufferC containing executable statements, TPU returns a program storingB these executable statements. If the buffer contains procedureB definitions, TPU 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 usimng 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 TPU procedure or statement.? range A range containing TPU procedures or statements.@ buffer A buffer containing TPU procedures or statements. Examples. 1. user_program := COMPILE (main_buffer);1 Compiles the contents of the mnain 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)ww4 1 CONVERT CONVERTF Given the coordinates of a point in one coordinate system, CONVERTB returns the corresponding coordinates for the point in anotherH coordinate soystem. 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 | window},( {CHARACTERS | COORDINATES},( to_x_integer, to_y_integer) ParametersJ DECW_ROOT_WINDOW Specifies the coordinate system being used by theB p root window of the screen on which TPU is! running.J SCREEN Specifies the coordinate system being used by the@ DECwindows window associated with TPU's* top-level widget.J window Specifies the coordinate system being used by the$ TPU window.H CHARACTERS Specifies a character-cell system for measuringK screen qdistance. 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 units 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 po rint 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 in the coordinate systemH and units specified by the fifthG and sixth parameter. The pointC sspecified 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 system (with the origin in the upper left-handE corner of the window) to the TPU screen's coordinate system (withH the origin in the upper left-hand corner of the TPU screen). If theJ current window is tnot the top window, CONVERT changes the value of the> y-coordinate to reflect the difference in the TPU screen's coordinate system. PROCEDURE user_convert LOCAL source_x, source_y, dest_x, dest_y; source_x := 1; 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;ww[ 1 COPYu_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}) 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. v 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 inserted 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, owr buffer., You cannot add a buffer or range to itself.F If the current buffer is mapped to a visible window, COPY_TEXT causesC TPU to synchronize the active editing point with the active cursorD position. As a result, TPU may insert padding blanks if the cursor position 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.x 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_OVERSTRIKEww[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 nyot 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 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 z 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 integer2.F integer2 Optionally, the lowest integer value you wantB TPU 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"} := 10ww[1 CREATE_BUFFER CREATE_BUFFERH Creates a new buffer -- a work space for editing text, storing data, and other purposes. Syntax? [buffer :=] CREATE_BUFFER (string1 [, [string2] [, [buffer], [, string3]]]) P }arameters9 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 VSI 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.E Note that TPU 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,G TPU names the journal file using its journal file n amingK 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 areF layering directly on TPU, 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");D Creates a buffer named "SCRATCH" and directs TPU to name theI associated buffer-change journal file "SCRATCH_JL.JL". Note thatC you must use commas as placeholders for the two unspecifiedA optional parameters. Note, too, that by default TPU putsB journal files in the directory 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) SHOWww[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 TPU 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_MAPww[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-map0 list created for use with other TPU 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_MAPww 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 SPAWNww 1 CREATE_RANGE CREATE_RANGEG Returns a range that includes two delimiters and all the charactersB 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 en ds.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.@ LI NE_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 cha racterE there. This is the same asB the point referred to byH BEGINNING_OF (CURRENT_BUFFER).B BUFFER_END The last position in theB buffer where a characterG could be inserted, regardlessI of whether there is a characte rE 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. CommentsD If a marker defining a range is a free marker, TPU 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_RANGEww1 CREATE_WIDGET CREATE_WIDGETE Has two variants. One variant creates a heirarc hy 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 specif y, 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 th e 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 ex ists andC is not TPU's main window widget.F SCREEN A keyword indicating that the newlyG created widget is to be the child of< TPU'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' TPU.I closure The closure value can be any string orF integer value you want. TPU simplyK passes the value to the application whenD the widget performs a callback to' TPU.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 for2 DECwindows TPU.K resource_mngr_identifier_name A case-sensitive string that is the nameI assigned to the widget in the U IL 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 theF widget to the TPU 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 TPU.$ 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 callsB the Toolkit low-level creation routine, see the DECwindows TPU documentation. Related Topics1 DELETE LOWER_WIDGET MANAGE_WIDGET MAP= RAISE_WIDGET SET(MAPPED_WHEN_MANAGED) UNMANAGE_WIDGET UNMAPww1 CREATE_WINDOW CREATE_WINDOWJ Creates a window -- an area on the screen for displaying data; optionallyE returns a window for use with other TPU 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 MAPww1 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_WINDOWww,ѫ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.)ww,ѫ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));A Combines three TPU 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 UPDATEww,ѫ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.ww,ѫ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_ROWww,ѫ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_ROWww,ѫ 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 UPDATEww,ѫ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_BUFFERww,ѫ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_HORZONTALww,ѫ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)ww,ѫ 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 ownB debugging program, you can use the debugger provided with TPU,' located in SYS$SHARE:TPU$DEBUG.TPU. Syntax integer := DEBUG_LINE Parameters none Related Topics SET(DEBUG)ww,ѫ 1 DEFINE_KEY DEFINE_KEY7 Associates executable TPU code with a key you specify. Syntax= DEFINE_KEY ({buffer | learn | program | range | string1},- keyword [,string2 [,string3]]) ParametersH buffer A buffer containing the TPU statements to be bound to the key.C learn A learn sequence containing the TPU statements to be bound to the key.G range A range containing the TPU statements to be bound to the key.E program A program containing the TPU statements to be bound to the key.H string1 A string specifying the TPU 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);F Defines CTRL/P as the TPU statement POSITION (main_window). Note7 that you must use quotes around the TPU statement.G 2. DEFINE_KEY ("COPY_TEXT ('Sincerely,')", KEY_NAME ("s",SHIFT_KEY));G Defines the combination of the TPU shift key (by default, PF1) andI the letter S (upper- or lower-case) to copy the text "Sincerely," 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 buffer@ (containing TPU statements). If there are no errors in theC compilation, TPU binds the executable code to that key (or key combination). Related topicsE LOOKUP_KEY KEY_NAME Keynames Table SHIFT_KEY UNDEFINE_KEYww<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 identify 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 routine 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 c ase-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 anC image, TPU assumes the widget is< defined in DECW$XMLIBSHR.ww<1 DELETE DELETEF Deletes TPU 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 bufferB was being journaled, TPU closes and deletes the journal file.; inte ger 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);H Deletes the main buffer and any associated resources that TPU 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<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 VSI 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 ke yword1[,...] [,keyword2] [,keyword3]) ParametersE buffer The buffer in which you want TPU to edit text.K Note that you cannot use the keyword NOT_IN_PLACE ifD you specify a buffer for the first parameter.D range The range in which you want TPU 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 paramet er. 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.H keyword2 A keyword specifying whether TPU quote charactersG are used as quote characters or as regular text.H The valid keywords are ON or OFF. The default is ON.D keyword3 A keyword indicating where TPU is 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.; Thi s 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 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 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<1 END_OF END_OFK Returns a marker pointing to the last character position in a buffer or a ra nge. 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<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_LINEwwL1 ERASE_CHARACTER ERASE_CHARACTERI Erases the number of characters you specify; optionally returns a stringD representing the erased characters for use in other TPU 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_LINEwwL 1 ERASE_LINE ERASE_LINEF Erases the current line from the current buffer; optionally returns aE string representing the erased line for use in other TPU 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_CHARACTERwwL1 ERROR ERRORF Returns a keyword for the latest error encountered by TPU. 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 following 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_TEXTwwL 1 ERROR_LINE ERROR_LINEF Returns the line number for the latest error encountered by TPU. 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_TEXTwwL 1 ERROR_TEXT ERROR_TEXTD Returns the text of the latest error message generated by TPU. 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_TEXTwwL 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.? The buffer must contain only valid TPU$ statements.H range The range whose contents you want execute. TheF range must contain only valid TPU statements.G string1 The string whose contents you want to execute.? The string must contain only valid TPUJ statements. The string cannot be longer than 132$ characters.? learn The learn sequence you want 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, y ou may optionallyG specify the key map or key map list from whichD TPU should get the key definition. If thisG parameter is not specified, TPU 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 theC first parameter, TPU inserts the appropriate character into the current buffer. Examples 1. EXECUTE (main_buffer);G Compiles the contents of the main buff er, and then executes anyI executable statements. If there is text in the main buffer otherD than 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 be@ called by other TPU statements, programs, or procedures.. 2. EXECUTE (RET_KEY, "TPU$KEY_MAP_LIST");H The following statement looks up the program bound to the RETURND key in the default TPU key map list and executes the code or learn sequence found.G 3. The following procedure prompts the user for a TPU statement to1 execute, and then executes the statement: PROCEDURE user_doF command_string := READ_LINE ("TPU statement to execute: ")$ EXECUTE (command_string); ENDPROCEDURE Related Topics COMPILE RETURNwwL1 EXIT EXITA Ends the editing session and writes out any modified buffers.F By default, TPU writes out a modified buffer using the output fileH specification associated with the buffer. If there is no associated7 output file specification, TPU prompts you for one.> Buffers having the NO_WRITE attribute are not written out. Related topics8 QUIT SET(NO_WRITE) SET(OUTPUT_FILE) WRITE_FILEwwL 1 EXPAND_NAME EXPAND_NAMEE Returns a string containing the name (or names) of TPU variables,F keywords, or procedures that begin with a string you specify. TPUI 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) ParametersC string1 The initial substring of a TPU name. The string mayF contain the asterisk wildcard (*, matching an arbitraryH number of characters) and percent wildcard (%, matching a+ single arbitrary character).6 keyword The type of TPU 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);> Returns in the variable FULL_NAME the following TPU words:, CREATE_BUFFER CREATE_KEY_MAP, CREATE_KEY_MAP_LIST CREATE_PROCESS+ CREATE_RANGE CREATE_WINDOWww\F1 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. date_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\F 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 many 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 parameter s as strings. Logical names and deviceK names must terminate with a colon. If 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\F 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 name s andK device names must terminate with a colon. If you omit optional parametersJ 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\F1 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 ] ] ] ]) Parameter s@ 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 a lwaysH 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 y ou 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 the 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 splits 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\F1 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\F 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 VSI Text Processing Utility Manual.B The following code fragment shows the portion of a module_initG procedure directing TPU 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;wwlm1 GET_GLOBAL_SELECT GET_GLOBAL_SELECTD Fetches information, to be used by TPU or an application layered on- TPU, about the global selection you specify. Syntax {integer | string | array |N UNSPECIFIED} := GET_GLOBAL_SELECT ({PRIMARY | SECONDARY | selection_name},; selection_property) ParametersD integer The value of the specified global selectionJ property. The global selection owner returns theF value to TPU 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 theD value to TPU as a string if the value is of% type string.D array An array passing information about a globalK selection whose contents describe information thatE is not of a data type supported by TPU. ForJ example, the array could return information about@ a pixmap, an icon, or a span. For moreG information about the conte nts of the returnedD array, see the documentation for DECwindows TPU.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 select ion.J SECONDARY A keyword indicating that the 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");wwlm 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 wantH information. Use the second parameter (a TPU 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. S yntaxE 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)E TPU 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' parameters 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 o n 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 PROCESS1 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.G parameter2 A TPU 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 CallsG TPU 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 avail able when parameter1 is a marker variable,/ invoke 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. For 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.3 The GET_INFO topics in TPU HELP are as follows:E Topics Where Topics WhereC Topics Where Parameter1 Parameter1G Parameter1  Is a Specific Is Any KeywordC 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(D EFINED_KEY)1 GET_INFO(PROCESS_VARIABLE) GET_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.wwlm1 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 parameter1 is a TPU 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 haveG | been used to create the TPU keyG | name specified b y 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, | TPU.D "key_type" | Keyword or - Returns a keyword describing@ | 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_CONT ROL.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 -------------------+------------------------------------------------+wwlm1 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 TPU keyword:A Parameter 2 | Return Value (Parameter 1 is a keyword)J -------------------+------------------------------------------------+I "name" | String - Returns the st ring representationI | of the keyword used as parameter1J -------------------+------------------------------------------------+wwlm1 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 TPU keyname:C Parameter 2 | Return Value (Parameter 1 is a variable)H ----- --------------+----------------------------------------------+9 "type" | Keyword - Data type of itemH -------------------+----------------------------------------------+ww|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 inter nal5 | 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 -------------------+--------------- ---------------------------------+ww|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 int eger 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 | i nteger 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 -------------------+------------------------------------------------+ww|1 GET_INFO(BUFFER) GET_INFO(BUFFER)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.H TPU 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 i s "find_buffer".8 | 0 - if buffer not foundG "first" | Buffer - First buffer in TPU's internal4 | list of buffers, | 0 - if noneG "last" | Buffer - Last buffer in TPU's internal list/ | of buffers, | 0 - if noneG "next" | Buffer - Next buffer in TPU's internal list/  | of buffers6 | 0 - if at end of listG "previous" | Buffer - Preceding buffer in TPU's internal4 | list of buffers< | 0 - if at beginning of listJ -------------------+------------------------------------------------+ww|1 GET_INFO(BUFFER_VARIABLE) GET_INFO(BUFFER_VARIABLE)G For an overview of the GET_INFO built-in, see the HELP topi c GET_INFO.F The 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 mea ning if "beyond_eob" 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 "beyond_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 representin g the end-of-buffer 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,F | set TPU HELP on SET(ERASE_UNMODIFIABLE). |G "file_name" | String - File name associated with the buffer when& | created. |A "first_marker " | Marker - First marker in TPU's internal listB | or 0 of markers for the buffer; returns 06 | if there are no markers. |C "first_range" | Range - First range in TPU'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 TPU 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 o f text at 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 column? | in which TPU 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< | TPU; it is not a simple columnE | number. Use GET_INFO (buffer_variable,K | "move_vertical_context") to obtain an enco ded> | 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. |@ "next_marker" | Marker - Next marker in TPU's internal listB | or 0 of markers for the buffer; returns 06 | if there are no markers. ! |B "next_range" | Range - Next range in TPU'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 editing " 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 editing p #oint 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. |D "read_routine" | Program The pr $ogram or learn sequence that TPUJ | 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. |< "record_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 | Keywor&d 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 more unmodifi*able records, 0 otherwise.N ----------------+------------------------------------------------------------ww1 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 (default),7 , | GENERAL, and ISO_LATIN1.G "command" | (1 or 0) - Indicates whether /COMMAND was used whenC | invoking TPU; returns 1 if defaulted+ | to /COMMAND.< "command_file" | String - File specified with /COMMAND=G "create" | (1 or 0) - Indicates whether /CREATE was used whenC | invoking TPU; returns 1 if defaulted* | to /CREATE.G "displa-y" | (1 or 0) - Indicates whether /DISPLAY was used whenC | invoking TPU; returns 1 if defaulted+ | to /DISPLAY.J "file_name" | String - File specification used as a parameter when, | invoking TPU.K "first_file_name"| String - First file specification used as a parameter1 | when invoking TPU.G | 0 - No file was specified when invoking TPU..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 whenC | invoking TPU; returns 1 if defaulted+ | 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 if neither: 0 | neither qualifier was used.J "next_file_name" | String - Next file specification used as a parameter1 | when invoking TPU.J | 0 - If no file was specified when invoking TPU,? | 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 | quali 1fier was used.F "output" | (1 or 0) - Indicates whether /OUTPUT was used whenC | invoking TPU; 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 when1 | when invoking TPU.G "recover" | (1 or 0) - Indicates whether /RECOVER was used when, | invoking 2TPU.G "section" | (1 or 0) - Indicates whether /SECTION was used whenC | invoking TPU; 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. | (default is 1 3).D "work" | (1 or 0) - Indicates whether /WORK was used whenC | invoking TPU; 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 "write" | (1 or 0) - Returns 1 if /NOREA4D_ONLY, /WRITE, or neitherJ | /WRITE nor /NOWRITE were used when invokingG | TPU; returns 0 if /READ_ONLY or /NOWRITE; | were used when invoking TPU.ww1 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 the keyword DEBUG:J Parameter 2 5 | 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. Returns TPU$_NONAMES ifJ | vari6able 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 the@ | breakpoi7nt 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 | and "previous" 8 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 parameter in parameter listI | 9Variable - 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 -------------------+------------------------------------------------+ww1 GET_INFO(DEFINED_KEY) GET_INFO(DEFINED_KEY)J For an overview of the GET_I :NFO 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 "f;irst" | 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 specified= | ke <y 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 "previous".ww1 GET_INFO(GLO=BAL_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 "na >me" | String - The string representation of the keywordF | associated with the specified integer.< | TPU outputs an error messageL | if no string is associated with the integer. |L ----------------+----------------------------------------------------------ww1 GET_INFO(KEY_MAP) GET_INFO(KEY_MAP)J For an overview of the GET_INFO built-in, see the HE ?LP 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 -------------------+------------------------------------------------+G "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 - if no key maps foundJ -------------------A+------------------------------------------------+H Use string constant "first", before using "next". Use "last" before using "previous".ww1 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.C TPU 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 name% of the list, not the list itself.K Th Be 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" | String - The next key-map list= "p Crevious" | String - The previous key-map listJ -----------------+--------------------------------------------------+H Use string constants "current" or "first", before using "next". Use1 "current" or "last" before using "previous".ww1 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 for parameter2 when parameter1 is a marker variable D: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 located9 | beyond the end of a buff Eer.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" | Integer - The display value associated with theE F | record containing the specified marker.E | For more information on display values,8 | see SET(DISPLAY_VALUE) and@ | SET(RECORD_ATTRIBUTE) in TPU 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 locatedG | in the middle of a tGab. 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 record number of the line containing the/ | H 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* | FREE_MARKER.J "within_range I" | (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 +---------------+--------------------------------------------------------+ww1 GET_INFO(MOUSE_EVENT_KEYWORD) GET_INFO(MOUSE_EVENT_KEYWORD)J For an overview of the GET_INFO built-in, see the HELP topic GET J_INFO.H The following string can be used for parameter2 when parameter1 is aG TPU 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, if you specifyJ | the ke Kyword 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: M1UP ... M5UP! M1DOWN ... M5DOWLN! M1DRAG ... M5DRAG" M1CLICK ... M5CLICK# M1CLICK2 ... M5CLICK2# M1CLICK3 ... M5CLICK3# M1CLICK4 ... M5CLICK4# M1CLICK5 ... M5CLICK5H The following string can be used for parameter2 when parameter1 is a) TPU keyword for a mouse button event:K Parameter 2 | Return Value (Parameter 1 is mouse event keyword)K -------------------+-------------------------------------------------+ MH "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 --------------------+--------------------------------------------------+ww1 GET_INFO(PROCEDURES) GET_INFO(PROCNEDURES)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 PROCEDURES)J -------------------+----------------------- O-------------------------+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 - Maximum number of parameters requiredC | P for the user-defined procedure= | specified by parameter3.J -------------------+------------------------------------------------+ww1 GET_INFO(PROCESS) GET_INFO(PROCESS)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.A TPU orders processes according to the order in which they are> created; the first ones created are the first in the list.K The following strings can be used for pa Qrameter2 when parameter1 is the keyword PROCESS.J Parameter 2 | Return Value (Parameter 1 is keyword PROCESS)J -------------------+------------------------------------------------+G "first" | Process - First process in TPU's internal6 | list of processes, | 0 if noneG "last" | Process - Last process in TPU's internal6 | list of R processes, | 0 if noneG "next" | Process - Next in TPU's internal list of. | processes: | 0 if at end of the listG "previous" | Process - Preceding process in TPU's? | internal list of processes< | 0 if at beginning of listJ -------------------+---------------------------------------S---------+ww1 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 -------------------+------------------------------------------------+D "pid" | Integer - Process identification numberE T "buffer" | Buffer - The buffer associated with the. | processJ -------------------+------------------------------------------------+ww1 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< parameter1 is a range variable, see the following table.H Parameter U2 | 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 | 0 otherwise.B "video" | Keyword - Video attVribute of the range.M +-------------------+---------------------------------------------------+ww1 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 -----------------+----------------------------------------------------------E "active_area" | WArray - 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} - Leftmost column of active areaA | array {3} X - 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 the terminal has the; | advanced video opti Yon (AVO). |D "client_message" | Keyword - Returns the keyword KILL_SELECTION orD | STUFF_SELECTION indicating if TPU 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 Z - 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" | Integer - 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 states@ | the cursor is in. VSI recommendsG ^ | that you use TPU'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.G | 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 16 No current window? | a 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 eightbit* | characters. |I "event" b | 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 naming the globalB | 0 selection property (such as STRIN cG)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 theG | call has been used in the wrong context.I d | You must specify the keyword GLOBAL_SELECTE | as the third parameter with this call. |J "first_input" | (1 or 0) - Indicates whether or not TPU has received aO | key or button event during this editing session. |D "first_input_ | Program - Returns the program or learn sequenceI routine" | or Learn implementing the application's first inputP e | or 0 action routine. If no such routine is designated,) | returns 0. |C "global_select" | (1 or 0) - Indicates whether TPU currently ownsD | the specified global selection. WhenJ | you use this request string for Parameter2,C | use a third parameter to specify theD | global selection about which you wantF f | 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 | Learn input focus grab routine. When you use thisI g| 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% | exist. |K "icon_name" | String h - The string used as the layered application's? | name in the DECwindows icon box. |= "input_focus" | 1 or 0 - Indicates whether TPU owns the+ | input focus. |J "jump_scroll" | 1 or 0 - Indicates whether the SET (SCROLLING, JUMP)D | statement has been used to direct TPUJ | to use the JUMP mode of scrolling (that is,A i | 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 none. In the DECwindowsG | version of TPU, this call always re jturns! | 0. |E "motif" | (1 or 0) - Indicates whether the Motif DECwindows8 | environment is available. |D "mouse" | (1 or 0) - Indicates whether TPU's mouse support7 | capability is turned on. |F "new_length" | Integer - The number of rows that the screen willG | have after the resize action routinke 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 as the current length of theF | screen. This call is not valid in thel2 | CCT version of TPU. |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 | length of the screen, to determine theB | length of windows. If used o mutsideC | a resize action routine, this lengthG | is the same as the current length of theE | screen. This call is not valid in the2 | CCT version of TPU. |D "old_length" | Integer - The length of the screen (measured inB | rows) before the most recent resizeD | event. This call is not valid in the2 n | CCT version of TPU. |C "old_width" | Integer - The width of the screen (measured inE | columns) before the most recent resizeD | event. This call is not valid in the2 | CCT version of TPU. |E "original_ | Integer - The length (measured in rows) that the? length" | screen had when TPU was invoked. o |G "original_width" | Integer - The width (measured in columns) that the? | screen had when TPU 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 current2 | DECwindows display. |H "pop_up_parent_ | Widget - The p 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. |E "read_routine" | Program The program or learn sequence that TPUK | or executes when it owns a global selection qandK | 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. |F "screen_limits" | Array - An integer-indexed array specifying theK | minim rum and maximum screen length and width.L | This call signals an error in the CCT version& | of TPU. |N "screen_update" | (1 or 0) - Indicates whether screen updating is turned on. |K "scroll" | (1 or 0) - Indicates whether the terminal has scrolling' | regions. |C "time" | String - The amount of time (in delta format)= s | TPU 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 application's global selection orL | Learn input focus ungrab routine. When you use thisI t | 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 if the specified ungrab routine does not% | exist. |; "visible_length" | In uteger - 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" | (1 or 0) - Indicates whether the terminal a VT300-series. |M "vt400" | (1 or 0) - Indicates w vhether the terminal a VT400-series. |B "widget" | Widget - TPU'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= | is no longer supported by TPU. |L +----------------+-----------------------------------w---------------------+ww 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 -------------------+------------------------------------------------+G "journal" | Array - Information about the journ xal 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 | corresponding elements are as- | follows: y|? | 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. z |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 | associated 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 contains: | a null string. |G | 7 ~ TPU's identification stringG | for the version of TPU 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 margin. ReturnsC | 0 if there is no such program.J "self_insert" | (1 or 0) - Indicates if prin table 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 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 keyword 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 line to line;J | returns 1 if it is set to keep the cursor in@ | the same column fr om 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 fromI | a terminal; returns 0 if the TPU session is4 | running in batch mode. |B "enable_resize" | (1 or 0) - Indicates whether screen resizing isC | enabled. By defau lt, 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. |E "line_number" | (1 or 0) - Indicates whether TPU displays the line> | number at which an error occurs. |G "message_ | Integer - Completion status severity level at whichH action_level" | TPU performs a message action you specify.E | Valid values are (in ascending order ofH | severity): 1 (success), 3 (informati onal),9 | 0 (warning), and 2 (error). |L "message_ | Keyword - Keyword describing the action to be taken whenE action_type" | TPU 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 |I "pad_ | (1 or 0) - Indicates whether TPU 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 inpu t 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 |G "recover" | (1 or 0) - Indicates whether or not TPU 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 |J "section_file" | String - Section file name used when TPU was invoked. |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: VARIABLE_CR for; | VMS, or STREAM_LF for ULTRIX. |G "timed_message" | String - Text TPU 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. |H "traceback" | (1 or 0) - Indicates whether TPU displays the callingG | sequence for TPU procedures when an error% | occurs. |C "update" | Integer - Update number of this version of TPU. |? "version" | Integer - Version number of the version TPU7 | that is presently in use. |G "work_file" | String - The fully qualified file name of the work@ | file opened by TPU during startup.J +---------------+-------------------------------------------------------+ww01 GET_INFO(WIDGET) GET_INFO(WIDGET)G For an overview of the GET_INFO b uilt-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 array> | created by TPU and assignedB | to "array_variable". After  TPUH | 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 controlledF |  by the specified widget or by TPU's6 | main window widget. |C | The syntax of this GET_INFO call1 | is as follows: |@ | GET_INFO (WIDGET, "children",? | {SCREEN | widget},< | array_variable) |G  | To specify TPU's main window widget,E | use the keyword SCREEN; otherwise,G | specify the widget you want. If theG | widget has any children, TPU createsG | an array 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 parame ter. 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 MotifK | 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, containing 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 +----------------+----------------------------------------------------------+ww01 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 following 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 name 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 belongs G | 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 "na me" | 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" | String - The text in a simple text widget. |F "widget_info" | Array - Values for various resources of the4 | or specified w idget. | 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 th e array or arrays, or the variableG | or variables containing the resourceI | values, or a mixture of array elementsH | and variables. If there are no valuesB | to return, TPU assigns an empty@ | array to the third parameter. |E | This GET_INFO call is functionallyG | equivalent to the DECwindows Toolkit6 | GET VALUES routine.M +----------------+---------------------------------------------------------+wwW1 GET_INFO(WINDOW) GET_INFO(WINDOW)J For an overview of the GET_INFO built-in, see the HELP topic GET_INFO.E TPU orders windows according to their "original top" line number.H If multiple windows have the same top line number, the most recently8 created window c omes first in TPU'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 "current" | Window - Current window on the screen;, | 0 if noneG "first" | Window - First window in TPU's internal4  | list of windows, | 0 if noneG "last" | Window - Last window in TPU's internal list/ | of windows, | 0 if noneG "next" | Window - Next window in TPU's internal list/ | of windows? | 0 if pointing at last windowG "previous" | Window - Preceding window in TPU's internal4 | list of windows@ | 0 if pointing at first windowJ -------------------+------------------------------------------------+wwW1 GET_INFO(WINDOW_VARIABLE) GET_INFO(WINDOW_VARIABLE)G For an overview 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 meaning 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 the last visible row ofK | the specified window or the specified window'sG | text area. The third parameter can be anyF | o f 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 i f 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 true? "next" | Window - Next window in TPU'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" | whe n it was createdI "pad" | (1 or 0) - Indicates whether the window is blank-padded) | at the rightC "previous" | Window - Previous window in TPU'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 window 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 the 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_GRAPHIC S 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 returned 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 - Scree n 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 ---------------+-----------------------------------------------------------wwW 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.wwW1 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.wwW1 INT INTJ Converts a string that consists of numeric characters into an integer,. if you specify a string for the parameter.G Converts a keyword into its TPU 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 solelyF  to prevent TPU 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 maintainsG compatibility with versions of TPU 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')ww~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)ww~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 (orB disk) and directory, TPU 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)ww~ 1 KEY_NAME KEY_NAME= Returns a TPU 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_MODIFI ED |, HELP_MODIFIED [, ...]]9 [, FUNCTION |, KEYPAD]) ParametersD string A single-character string, or an expressionA evaluating to a single-character string,J representing the character for which a keyword isI to be generated. The character must be a member@ of the DEC Multinational Character Set.1 keyword1 A TPU keyname f or 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 ofE the TPU keyword that names the key. You canI obtain this integer representation using the INTI built-in. Alte rnatively, 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 characterH and for which there is no existing TPU keyname.J SHIFT_KEY  A keyword indicating that the returned keyword isG preceded by one or more shift keys. SHIFT_KEYF refers to the TPU shift key (PF1 by default),; not the SHIFT key on the keyboard.J SHIFT_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 f unction 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 keyF or sequence of keys. For a list of existing TPU keynames, see the2 TPU 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)ww~ 1 LAST_KEY LAST_KEYB Returns a TPU keyword for the last key you entered or that TPUF 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_KEYww~ 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 ABORTww~ 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.G NOEXACT Specifies that TPU 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 VSI Text Processing Utility Manual.ww쥭 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.G NOEXACT Specifies that TPU 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 VSI Text Processing Utility Manual.ww쥭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.ww쥭 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_ENDww쥭 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_BEGINww쥭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 locate d. 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 window-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. CommentsH In the non-DECwindows version of TPU, this built-in can only be usedH in programs, procedures, or learn sequences bound to mouse keys. InD the DECwindows version of TPU, LOCATE_MOUSE can be used any timeI after the first keyboard or mouse-button event. The built-in returnsG 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 POSITIONww쥭 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 return ed.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_KEYww쥭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) ParametersC widget The widget instance you want TPU 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 UNMAPww̭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) ParametersC widget The widget instance you want TPU 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 UNMAPww̭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_WIDGETww̭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 widget's$ DECwindows window to the screen.3 MAP (widget) is useful for the following tasks:< 1. To make TPU'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 t o 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 UNMAPww̭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.E TPU 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 a B 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. ByG default, TPU locates 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. ByG  default, TPU 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, theF maximum record length in TPU 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 leftC margin or greater than the end of the line, TPUK places the marker in the specified location and insertsK padding blanks in the buffer between the marker and theH nearest text. By default, TPU locates the marker inI the buffer offset corresponding to the current screenG column. Note that TPU performs the conversion fromF screen column to buffer offset for you; 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. ByA default, TPU places the marker in the current record. CommentsD If you create a marker in a location containing no character andC specify a parameter other than FREE_CURSOR, TPU 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 specify a location that has noC text associated with it, TPU 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 andB specify the parameter FREE_CURSOR, TPU does not insert paddi ngH 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 FILLww 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 the 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 characters 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_QUIETLYww 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 isB one. By default, TPU 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 Informational A keyword The TPU keyword representing the message code; associated with the text to be fetched.H integer2 The integer representing the message code associated0 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:4 Bit TPU Constant MeaningO -----------------------------------------------------------G 0 TPU$K_MESSAGE_TEXT Include text of messageJ 1 TPU$K_MESSAGE_ID Include message identifierF 2 TPU$K_MESSAGE_SE VERITY 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 moreC information on the FAO built-in in TPU, 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.D The second syntax format causes TPU 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 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 isG especially useful if you access TPU through the callable interface and link in your own message file. Syn tax? [string := ] MESSAGE_TEXT ({integer1 | keyword} [, integer23 [, FAO parameters]]) ParametersI keyword The keyword for the message code associated withF the text that is to be fetched. TPU providesG keywords for all the message codes used by TPU! 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 flagsH 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 TPU C onstant 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 fi rst 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 moreH information on the FAO built-in in TPU, see theI description of that built -in in Chapter 4 of the< VSI 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. TheB statement substitutes the string "FOO.BAR" into the message. TPUK fetches the entire text of the message. The string "Error opening FOO.BAR1 as input" is stored in the variable OPENIN_TEXT.ww 1 MODIFY_RANGE MODIFY_RANGEB Allows a TPU 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 keywords 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 th e 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 delimiter s 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_RANGEww1 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_VERTICALww 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 y ou 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 causesF TPU to synchronize the active editing point with the active cursorG position. As a result, TPU 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)ww1 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). CommentsB By default, TPU keeps the cursor at the same offset on each line.D However, since TPU 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);H This statement directs TPU to keep the cursor in the same column unlessE a tab character makes this impossible. If a tab occupies the column< position, TPU 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)ww1 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> pattern := 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_QUIETLYww" 1 NOTANYL NOTANYL. The NOTANYL 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.ww 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 win#dow. SyntaxA POSITION ({buffer | marker | range | window | integer | MOUSED | LINE_BEGIN | LINE_END | BUFFER_BEGIN | BUFFER_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 mu %st be mapped to the screen.F integer The number of the record where you want TPU to positionD the editing point. The statement 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 currentF buffer. In the non-DECwindows version of TPU, POSITIONK (MOUSE) is only valid during a procedure that is executed asG a result of a mouse click. In the DECwindows version ofE TPU, 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 c*hanges 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 UPDATEww,B1 QUIT QUIT< Ends the editing session without w+riting an output file. Syntax" QUIT [{ OFF | ON} [,severity]] ParametersH OFF Tells TPU not to check if any buffers have been modified.C ON Tells TPU 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 (OF-F);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_FILEww.,B 1 READ_CHAR READ_CHARC Stores in a string variable the next character entered from theI keyboard. This character 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.G In the DECwindows version of TPU, the READ_CHAR built-in cannotE read a keypad /key or a function key. If a TPU procedure usesJ READ_CHAR and the user presses a keypad or function key, READ_CHARF 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.0 If a key that sends an escapeG sequence is pressed, the entire escape sequence is put into the+ buffer, as if it were regular text.& PROCEDURE user_quote_character! COPY_TEXT (READ_CHAR); ENDPROCEDURE; Related topics, ASCII COPY_TEXT READ_KEY READ_LINEww,B1 READ_CLIPBOARD READ_CLIPBOARDJ Reads string-formatted data from the clipboard. Copies the data into theD current TPU buffer at the editing point, us1ing the buffer's current" text mode (INSERT or OVERSTRIKE). Syntax+ [range | unspecified] := READ_CLIPBOARD 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. CommentsG If TPU finds a line-feed character in the data, it removes the lineK feed and any adjacent carriage retur 2ns and puts the data after the lineG feed on the next line of the buffer. If TPU must truncate the dataF from the clipboard, TPU copies the truncated text into the current buffer.J All text read from the clipboard is copied into the buffer starting atH the editing point. If TPU 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 statem3ent copies the contents of the clipboard into the current buffer: READ_CLIPBOARD;ww,B 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 fileA specification of the file to be read. TPU displays a message2 indicating how many records (lines) were read. Syntax$ [string2 :=] READ_FILE (string1) ParametersH string1 4Specifies the file you want to read into the current buffer. Examples* 1. READ_FILE ("SYS$LOGIN:LOGIN.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 :5= CREATE_WINDOW (1, 10, ON);6 buffer2 := CREATE_BUFFER ("second_buffer");" MAP (window2, 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_FILEww,B1 READ_GLOBAL_SELECT READ_GLOBAL_SELECTK Gets information from or about a global selection. Copies the informationB into TPU'6S current buffer at the editing point using the buffer'sH current text mode (INSERT or OVERSTRIKE). Also 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# 7 buffer.G UNSPECIFIED A data type indicating that the informationH 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 8 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 9 the PRIMARY or SECONDARY global selection.J string The string-formatted 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 format@ before copying it to the TPU buffer. Comments :F All text read from the primary global selection is copied into theF current buffer starting at the editing point. If TPU 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");wwas a prompt and reads the informationH entered in response. You can specify the number of 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 ent ?ered inI response to the prompt. The maximum is 132. If READ_LINEI 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 TPU keyJ definitions; the built-in reads literally all keys except standard VMS terminator@s. Examples< 1. my_prompt := READ_LINE ("Enter key definition:", 1);F 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)A;# ! Press the keys "END" my_key := LAST_KEY;% IF my_key = KEY_NAME ("D") THEN# MESSAGE ("D key"); ELSE& MESSAGE ("Error..."); ENDIF; ENDPROCEDURE; Related topics# LAST_KEY READ_CHAR READ_KEYww 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 ( G"junk.txt", , template_buffer);/ The third parameter is completely optional.F If TPU 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 Hoperations did notG trigger a write operation. For more information on how TPU 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 attributeIs.C If you press CTRL/C during a recovery, TPU aborts the recovery,B closes the journal file, and deletes the newly created buffer.E After a successful recovery, TPU continues journaling new changes< into the journal file that was used during the recovery. Example# 1. RECOVER_BUFFER ("junk.txt")E Directs TPU to find the buffer-change journal file associatedG with the original buffer JUNK.TXT. Creates a new buffer calledH JUNK.TXT. Using J the information from the journal file, recoversG the changes made 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 Klater point in the session (represented by the elipses) theK RECOVER_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 L SET (EOB_TEST, defaults_buffer, "[That's all, folks!]");K 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) JOMURNAL_OPEN/ JOURNAL_CLOSE SET(JOURNALING)ww user$keymap_list := CREATE_KEY_MAP_LIST ("my_keymap_list",6 user$keymap_1, user$keymap_2);: R ADD_KEY_MAP (user$keymap_list, "last", user$keymap_1); ~. ~. SHOW (KEY_MAP_LISTS); ~. ~.: REMOVE_KEY_MAP (user$keymap_list, user$keymap_1, ALL); ~. ~. SHOW (KEY_MAP_LISTS);wwL1 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 Sa procedure or to return" a value or status in a procedure. Syntax: 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#T IF ERROR = TPU$_NOPARENT THEN> MESSAGE ("Not running TPU 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" U SET (SHIFT_KEY, LAST_KEY);3 gold_key := KEY_NAME (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) THEVN4 RETURN (1); ! True -- at end of line ELSE9 RETURN (0); ! False -- not at end of line ENDIF; ENDPROCEDURE;wwL1 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 Specifi Wes the section file you want to create. IfD you supply only the file name, TPU uses theK current (default) device and your current, defaultK directory. The default file type is .TPU$SECTION.F "NO_DEBUG_NAMES" Prevents TPU from writing procedure parameterK names or local variable names to the section file.I This reduces the size of the file, but should beJ X used only if you do not plan to debug the section file.E "NO_PROCEDURE_NAMES" Prevents TPU 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 Y ON.G "IDENT" Directs TPU to associate 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 definition Zs binding a statement, procedure, program, or a learnH 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.)E To invoke TPU 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) andD directory; otherwise, TPU 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.wwL1 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. S]CAN 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 causeH TPU to stop matching characters in the searched text.E range A range containing the characters that causeH TPU to stop matching characte ^rs in the searched text.F buffer A buffer containing the characters that causeH TPU to stop matching characters in the searched text.G FORWARD A keyword directing TPU to match characters in/ the forward direction.G REVERSE A keyword directing TPU to match characters asI follows: First, match characters in the forwar_dH direction until TPU 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 untilG TPU finds a character in the specified buffer,K range, or string. You can spec `ify REVERSE only ifE 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 aif there might have been a longerG successful match in the reverse direction. ByE specifying REVERSE with SCAN, you direct TPUJ 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 doesb not contain an a, b, 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 follo cwing text:B "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 kedyword, like this: 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 UNANCHORwwL1 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 wieth SCANL can match text 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 causeH TPU to stop matching characters in the searched f text.E range A range containing the characters that causeH TPU to stop matching characters in the searched text.F buffer A buffer containing the characters that causeH TPU to stop matching characters in the searched text.G FORWARD A keyword directing TPU to match characters in/ the forward direction.G g REVERSE A keyword directing TPU to match characters asI follows: First, match characters in the forwardH direction until TPU 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 hn the reverseE direction until TPU 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 i 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. ByF specifying REVERSE with SCANL, you direct TPUJ not to stop matching in either direction until itD has matched as many characters as pjossible. 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 assignmkent 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 statement: l, 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 reverse mdirections.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 down on thne 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 scrol ol 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 value mpay 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_buffer);q 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 r [{,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# s 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 in tteger 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 u 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 begi vnning 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 t whe end of the range if a reverseK search. If the fourth parameter is not specified,? SEARCH operates on the current buffer. ExamplesH 1. The following statement causes TPU 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 NOx_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$_STRNOTFOUND y 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 sequence of charazcters 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 th{e 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 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 TPU$K_SEARCH_DIACRITICAL -- Specifies a searchJ that is sensitive to diacritical markings but may4 not be insensitive to case.F You can perform B ~oolean 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 o n 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. ExamplesH 1. The following statement c auses TPU 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;wwlޮ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_RANGEwwlޮ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 SELECTwwlޮ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 SPAWNwwlޮ1 SEND_CLIENT_MESSAGE SEND_CLIENT_MESSAGE Syntax< SEND_CLIENT_MESSAGE ({STUFF_SELECTION | KILL_SELECTION}) Parameters< STUFF_SELECTION A keyword directing TPU 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-  the TPU application.C KILL_SELECTION A keyword directing TPU 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 theC TPU application has copied that selection.wwlޮ 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 SPAWNwwlޮ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 REVERSEA 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_VALUE 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 SHOWwwlޮ1 SET(ACTIVE_AREA) SET(ACTIVE_AREA)< Designate s the specified area as the "active area" in a TPUB window. The active area is the region in the window in which TPU ignoresF movements of the pointer cursor for purposes of distinguishing clicks8 from drags. When the user presses down a mouse button,; TPU 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,. TPU 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);ww|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;ww| 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,* such 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 bellF to ring; TPU displays bell characters as uninterpreted control codes.J You can also use DCL commands to affect the display of broadcast messagesE within TPU. 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)ww|1 SET(CLIENT_MESSAGE) SET (CLIENT_MESSAGE)G Specifies the program or learn sequence TPU 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 TPU.D program_source A string, buffer, range, learn sequence, orK program specifying the client message routine. IfG you do not specify this parameter, TPU deletesH the current client message routine; thereafter,B your application is not informed when TPUC receives a client message from DECwindows.H NONE A keyword instructing TPU to delete the current0 client message routine.ww|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 toB which the cursor moves. This is the default. Since TPUH 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-ste pG debugging. Each time the line number in a TPUB 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 'proced ure_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 (DEBU G, 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 session.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.G value A value of any data type in TPU. You can onlyI 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 directory. SyntaxG [old_default_string :=] SET (DEFAULT_DIRECTO^SET(AUTO_REPEAT)d SET(BELL)SET(CLIENT_MESSAGE)SET(COLUMN_MOVE_VERTICAL)DSET(CROSS_WINDOW_BOUNDS)f SET(DEBUG)SET(DEFAULT_DIRECTORY)SET(DEFAULT_FILE)SET(DETACHED_ACTION)@SET(DISPLAY_VALUE)SET(DRM_HIERARCHY)SET(ENABLE_RESIZE)P SET(EOB_TEXT)SET(ERASE_UNMODIFIABLE)SET(FACILITY_NAME)rSET(FIRST_INPUT_ACTION) SET(FORWARD)HSET(GLOBAL_SELECT)SET(UID) TPURY, 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 the old default# directory. Comments H Note that when exit from TPU, your current, default directory is not> restored to the default that was set when you invoked TPU.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.E If you specify a logical name that is a search list, TPU 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)B Specifies the code to be executed when the TPU 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 ind icating 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)H Sets the display value of the specified window. TPU 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'sD setting, TPU makes the record visible in that window; otherwise,E TPU 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)wwS1 SET(DRM_HIERARCHY) SET (DRM_HIERARCHY)G Sets the User Interface Definition (UID) file or files to be used withB TPU. A UID file contains widget definitions that are used by the Resource Manager. See help on SET (UID).wwS 1 SET(UID) SET (UID)G Sets the User Interface Definition (UID) file or files to be used withB TPU. 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 usedF with TPU. 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)H file MYNODE$DUA0:[SMITH]EXAMPLE.UID as a file to be used with TPU to5 create widgets needed by the layered application:" example_hierarchy := SET (UID,@ "mynode$dua0:[smith]example.uid");wwS1 SET(ENABLE_RESIZE) SET(ENABLE_RESIZE)? Enables or disables resizing of the TPU screen. If the secondD parameter is the keyword ON, TPU gives DECwindows hints (parametersJ that DECwindows is free to use or ignore) about the allowable maximum and@ minimum sizes for the TPU screen. The hints are set by the SETK (SCREEN_LIMITS,...) built-in. If the second parameter is the keyword OFF,B TPU uses the screen's current width and length as the maximum and minimum size. Syntax# SET (ENABLE_RESIZE, {OFF | ON}) ParametersD OFF A keyword that disables TPU's screen resize! support.C ON A keyword that enables TPU's screen resize! support. Example4 The following statement enables screen resizing: SET (ENABLE_RESIZE, ON);wwS1 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.wwS1 SET(ERASE_UNMODIFIABLE) SET(ERASE_UNMODIFIABLE)C Controls whether TPU 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}) Parameters I 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)wwS1 SET(FACILITY_NAME) SET(FACILITY_NAME)D Sets or changes the facility name -- the first item in a messageB generated by TPU. This built-in is valid only on VMS systems. Syntax SET (FACILITY_NAME, string) ParametersK string T he 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.wwS1 SET(FIRST_INPUT_ACTION) SET (FIRST_INPUT_ACTION)G Specifies the program or learn sequence TPU 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 whenH TPU receives the first key or button event fromJ  DECwindows. Use of this built-in after the firstG key or button event is received will cause TPUE to signal an error as it should be used only> before the first key or button event.H NONE A keyword instructing TPU to delete the current- first input routine.wwS1 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)wwS1 SET(GLOBAL_SELECT) SET (GLOBAL_SELECT)B Causes TPU 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_name 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.D GLOBAL_SELECT_GRAB TPU to grab the selection specified in theI second parameter. This is the default if you do: not specify the fourth parameter.@ GLOBAL_SELECT_UNGRAB A keyword telling TPU to relinquish theE selection specified in the second parameter.wwz1 SET(GLOBAL_SELECT_GRAB) SET (GLOBAL_SELECT_GRAB)G Specifies the program or learn sequence TPU should execute whenever it8 automatically grabs ownership of the PRIMARY selection. Syntax@ SET (GLOBAL_SELECT_GRAB, SCREEN [, {program_source | NONE}]) ParametersE SCREEN A keyword used for compatibility with future) version s of TPU.D program_source A string, buffer, range, learn sequence, orJ program specifying the grab procedure. If you doD not specify this parameter, TPU deletes theK current global selection grab routine; thereafter,H your application is not informed when TPU grabs6 the PRIMARY global selection.H NONE A keyword instructing TPU to delete the current7 global selection grab routine.wwz1 SET(GLOBAL_SELECT_READ) SET (GLOBAL_SELECT_READ)G Specifies the program or learn sequence TPU should execute whenever itB receives a Selection Request event on a global selection it owns. SyntaxK SET (GLOBAL_SELECT_READ, {SCREEN | buffer} [, {program_source | NONE}]) ParametersD SCREEN A keyword indicating that the application'sG default geSET(FACILITY_NAME)rSET(FIRST_INPUT_ACTION) SET(FORWARD)HSET(GLOBAL_SELECT)dSET(GLOBAL_SELECT_GRAB)NSET(GLOBAL_SELECT_READ)SET(GLOBAL_SELECT_TIME)SET(GLOBAL_SELECT_UNGRAB) SET(HEIGHT)SET(ICONIFY_PIXMAP)SET(ICON_NAME)&SET(ICON_PIXMAP)SET(INFORMATIONAL)"SET(INPUT_FOCUS)SET(INPUT_FOCUS_GRAB)fSET(INPUT_FOCUS_UNGRAB)D SET(INSERT)<SET(JOURNALING)SET(UID) TPU lobal 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,F TPU deletes the current global selection read#  procedure.H NONE A keyword instructing TPU to delete the current9 global selection read procedure.wwz1 SET(GLOBAL_SELECT_TIME) SET(GLOBAL_SELECT_TIME)H Specifies how long TPU 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 TPU.G integer The number of seconds to wait. The default is& five seconds.- string A delta time string.wwz1 SET(GLOBAL_SELECT_UNGRAB) SET (GLOBAL_SELECT_UNGRAB)G Specifies the program or learn sequence TPU 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 TPU.D program_source A string, buffer, range, learn sequence, orI  program specifying the ungrab procedure. If youG do not specify this parameter, TPU deletes theA current global selection ungrab routine;J thereafter, your application is not informed whenC TPU loses ownership of a global selection.H NONE A keyword instructing TPU to delete the current9 global selection ungrab routine.wwz 1 SET(HEIGHT) SET(HEIGHT)J Sets the height of the screen without modifying the height or location of any TPU 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. CommentsG Note that although SET (HEIGHT) does not alter any TPU 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)wwz1 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.wwz1 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 that is the name assignedF to the icon in the UIL file defining the iconK pixmap. The icon must be declared EXPORTED in the" UIL fil e.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 nam es 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 specify the exact; name of the icon in your UIL file.F string2 The file specification of a bitmap file. SETH (ICON_PIXMAP) requires these fi les 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. ByA default, TPU se ts 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.G TPU automatically selects the application's largest icon allowed byH the Motif Window Manager. TPU does this when the user executes thisF built-in, or changes the window manager icon size and restarts the window manager.F TPU 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)wwz1 SET(ICONIFY_PIXMAP) SET(ICONIFY_PIXMAP)? This built-in is obsolete as TPU no longer supports the XUI DECwindows interface. Related Topics SET(ICON_PIXMAP)ww1 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. CommentsF If you invoke TPU using a section file, informational messages mayG not be displayed. If you invoke TPU using /NOSECTION (such as whenH creating a new application), informational messages are displayed by default. Related topics1 SET(BELL) SET(FACILITY_NAME) SET(SUCCESS)ww1 SET(INPUT_FOCUS) SET (INPUT_FOCUS)' Causes TPU to request the input focus. Syntax) SET (INPUT_FOCUS [, SCREEN | widget]) ParametersG SCREEN A keyword indicating that the top-level widgetD associated with TPU is to receive the input> focus. The default if not specified.K widget The widget that is to receive the input focus. IfF you do not specify this second parameter, TPUG requests input focus for the top-level widget.ww1 SET(INPUT_FOCUS_GRAB) SET (INPUT_FOCUS_GRAB)G Specifies the program or learn sequence TPU 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 TPU.D program_source A string, buffer, range, learn sequence, orH program specifying the input focus routine. IfG you do not specify this parameter, TPU deletesJ the current input focus routine; thereafter, yourG application is not informed when TPU processes9 a FocusIn event from DECwindows.H NONE A keyword instructing TPU to delete the current- input focus routine.ww1 SET(INPUT_FOCUS_UNGRAB) SET (INPUT_FOCUS_UNGRAB)G Specifies the program or learn sequence TPU 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 TPU.D program_source A string, buffer, range, learn sequence, orJ program specifying the ungrab routine. If you doD not specify this parameter, TPU deletes theH current input focus ungrab routine; thereafter,B your application is not informed when TPUD processes a FocusOut event from DECwindows.H NONE A keyword instructing TPU to delete the current4 input focus ungrab routine.ww 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)ww1 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 journal ing.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,H TPU automatically creates it. You cannot specifyK this parameter if you have specified the keyword OFFJ for the third parameter. If you do not specify anyA file name when you turn journaling on, TPUH creates a journal file for yo u 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 and@ directs TPU 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 frequently F 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_BUFFERww1 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_MAPww1 SET(KEYSTROKE_RECOVERY) SET(KEYSTROKE_RECOVERY)G Controls whether TPU interprets the /RECOVER qualifier to mean thatH the application must execute adSET(INPUT_FOCUS_GRAB)fSET(INPUT_FOCUS_UNGRAB)D SET(INSERT)<SET(JOURNALING)HSET(KEYSTROKE_RECOVERY)FSET(KEY_MAP_LIST)HSET(LEFT_MARGIN)DSET(LEFT_MARGIN_ACTION)2SET(LINE_NUMBER)8SET(MAPPED_WHEN_MANAGED) SET(MARGINS)SET(MAX_LINES)SET(MENU_POSITION)FSET(MESSAGE_ACTION_LEVEL) NSET(MESSAGE_ACTION_TYPE) SET(MESSAGE_FLAGS)SET(MODIFIABLE)| SET(MODIFIED) SET(MOUSE)SET(UID) TPU JOURNAL_OPEN statement. When you useB SET (KEYSTROKE_RECOVERY, OFF), TPU allows a program to proceedI without error, even if /RECOVER was specified at startup time and the= program executes no corresponding JOURNAL_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 journalin g for recovery.H ON A keyword indicating that the TPU session is toJ perform a recovery from a keystroke journal file,K even if /NORECOVER is specified during invocation.F OFF A keyword indicating that even if /RECOVER isG specified when TPU is invoked, the applicationH need not use a JOURNAL_OPEN statement opening aH journal fil e. 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 after- TPU 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)wwȯ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)wwȯ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 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 s pecify this parameter, the previously defined, program is deleted.C buffer2 The buffer containing TPU 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.B range The range containing TPU 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.C string The string containing TPU 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)wwȯ1 SET(LINE_NUMBER) SET(LINE_NUMBER)G Determines whether TPU displays line numbers when reporting errors. Syntax! SET (LINE_NUMBER, {ON | OFF}) ParametersF  ON Causes TPU, 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.wwȯ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.F ON A keyword directing TPU to make the specifiedH widget visible when it is managed. By default,9 widgets are mapped when managed.@ OFF A keyword directing TPU not to make theE specified widget visible when it is managed. Related Topics0 CREATE_WIDGET DELETE MANAGE_WIDGET MAP2 REALIZE_WIDGET UNMANAGE_WIDGET UNMAPwwȯ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)wwȯ1 SET(MAX_LINES) SET(MAX_LINES)G Specifies the maximum number of lines the buffer can contain. If thisG number is exceeded, TPU 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 youF specify 0, the feature is turned off; that is, TPU 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.wwȯ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 managesH the the pop-up widget, TPU positions the pop-upF widget for the current windowing environment.D TPU 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 the! 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 r equires6 M3DOWN activate pop-up menus.I array2 An integer-indexed array of pop-up widgets to beI set for automatic 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.B NONE A keywo rd directing TPU 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 UNMAPwwȯ1 SET(MESSAGE_ACTION_LEVEL) SET(MESSAGE_ACTION_LEVEL)G Sets the severity level at which TPU 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 atB which TPU is to take the action you designate. TheI default value is 2. Th e 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 ErrorD TPU performs the action you specify on all completi onF messages at the severity level you designate and on all, messages of greater severity.D keyword The keyword associated with a TPU completion message.F TPU 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. ExamplesF 1. The following statements directs T PU 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);G 2. The following statements direct TPU 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, T PU$_SUCCESS); Related Topic SET(MESSAGE_ACTION_LEVEL)ww1 SET(MESSAGE_ACTION_TYPE) SET(MESSAGE_ACTION_TYPE)F Sets the action to be taken when TPU generates a completion status of the severity you specify. Syntax6 SET (MESSAGE_ACTION_TYPE, {NONE | BELL | REVERSE}) ParametersC NONE Directs TPU to take no action. This is the default.H BELL Directs TPU to ring the terminal's bell when a completion7 status  of the specified severity occurs.F REVERSE Directs TPU 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. ExampleH The following statements  directs TPU 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)ww1 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 theG message text. It causes TPU 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 included/ in a TPU 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)H are to be included in TPU messages. (Integer 5 sets bits 2 and 0.) Related topicsD MESSAGE SET(FACILITY_NAME) SET(INFORMATIONAL) SET(SUCCESS)ww1 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.ww1 SET(MODIFIED) SET(MODIFIED)@ Turns on or turns off TPU'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.@ OFF A keyword that turns off TPU's internal0  modified-status marker.? ON A keyword that turns on TPU's internal0 modified-status marker.ww 1 SET(MOUSE) SET(MOUSE)1 Determines whether TPU mouse support is enabled. Syntax SET (MOUSE, {ON | OFF}) ParametersC ON Causes TPU 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.E OFF Disables TPU 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. IfH the TPU 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.F Since TPU mouse support disables the UIS terminal emulator cut andF paste feature, you must turn off TPU mouse support to use this cut and paste capability in TPU. Example4 The following statement turns off mouse support: SET (MOUSE, OFF) Related Topics( DEFINE_KEY LOCATE_MOUSE POSITIONww1 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,G is an attribute specifying the horizontal region in which TPU tries toA keep the cursor during successive MOVE_VERTICAL operations. TPU7 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_VERTICAL 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 theD buffer's context, TPU uses two pieces ofK information. One is the screen column in which?  TPU 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, directH  TPU 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 effectA of resetting the column to which TPU tries to position duringG subsequent MOVE_VERTICAL operations. (The column that TPU 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 an d 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 specify 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 value of the current buffer's contextD before TPU 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)ww1 SET(NO_WRITE) SET(NO_WRITE)E Specifies that, on 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. WhS NSET(MESSAGE_ACTION_TYPE) SET(MESSAGE_FLAGS)SET(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)*xSET(POST_KEY_PROCEDURE).RSET(PRE_KEY_PROCEDURE)3 SET(PROMPT_AREA)4SET(RECORD_ATTRIBUTE)@SET(RECORD_MODE)FSET(RESIZE_ACTION)H SET(REVERSE)SET(UID) TPU en 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);H Sets the paste buffer to no-write. When you exit, TPU 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);H Changes the buffer MY_BUFFER from no-write. On exiting, TPU writesH out this buffer using the output file specification associated withJ the buffer. If there is no output file specification for the buffer, TPU prompts you for one. Related topics6 EXIT QUIT SET(MODIFIABLE)1 SET(OUTPUT_FILE) SET(SYSTEM) WRITE_FILEww1 SET(OUTPUT_FILE) SET(OUT"PUT_FILE)G Specifies the output file for a buffer. On exiting, if the buffer hasD been modified and is not set to no-write, TPU 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 a#s the input fileI specification (if any), with 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_FILEww1 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)ww 1 SET(PAD) S%ET(PAD)D Determines whether TPU 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 wan &t 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.B ON Specifies that TPU 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 theD buffer to fill an entire window, TPU 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)ww1 SET(PA(D_OVERSTRUCK_TABS) SET(PAD_OVERSTRUCK_TABS)H Determines what TPU 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 isB OVERSTRIKE, ON causes TPU to preserve theF column positions of existing text w )hen a userI enters text in the white space created by a tab.E OFF In a buffer where the text insertion mode isF OVERSTRIKE, causes TPU 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 m*oves left when the tab is removed.ww1 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)ww1 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 which 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.C buffer The buffer containing TPU 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.B range The range containing TPU 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.C string The string containing TPU 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 / parameter, 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")');ww=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 a0 defined key. Syntax- 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 1defined, program is deleted.C buffer The buffer containing TPU 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.B range The range containing TPU statements to beD compiled, if necessary, and 2 executed when aG defined key is pressed. If you do not specifyJ this parameter, the previously defined program is! deleted.C string The string containing TPU 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! 3 deleted.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"))');4ww=1 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 5 No video attributes 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)6E Sets or alters 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 | range7 | buffer], MODIFIABLE, [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 8set.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 specif 9yD 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 : third 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 aE given window, TPU compares the record'sE ; display setting 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 toH the window's setting, TPU makes the recordD visible in that window; otherwise, TPU9 makes the record invisible.H margin_setting_integer < An integer 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 u >sing SETC (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 ju ?st one call. 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 c@hange the: 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);FA 3. The 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 creatBed withoutG 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 mod Ce:D 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_ DCR fab$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 w Eith no input 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 writtFen to disks 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 recordG_mode for all 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 e1 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 SE HT (RESIZE_ACTION [, {program_source | NONE}]) ParametersE program_source A buffer, learn sequence, program, range, orI string specifying the resize action routine thatB TPU should execute whenever it receives a& resize event.F NONE A keyword directing TPU to delete the currentD resize action routine. If you specify thisD keyword or do nIot specify a parameter, yourH application is not informed when TPU receives a6 resize event from DECwindows.ww e1 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 searJches and movement. Related topics* SCROLL SET(SCROLLING) SET(FORWARD)ww e1 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 than Lthe 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 e1 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 cursoW3 SET(PROMPT_AREA)4SET(RECORD_ATTRIBUTE)@SET(RECORD_MODE)FSET(RESIZE_ACTION)H SET(REVERSE)IbSET(RIGHT_MARGIN)JTSET(RIGHT_MARGIN_ACTION)OHSET(SCREEN_LIMITS)RSET(SCREEN_UPDATE)]8SET(SCROLLING)XSET(SCROLL_BAR)ZSET(SCROLL_BAR_AUTO_THUMB)gFSET(SELF_INSERT)iSET(SHIFT_KEY)lSET(SPECIAL_ERROR_SYMBOL)oSET(STATUS_LINE)sH SET(SUCCESS)t, SET(SYSTEM)vSET(TAB_STOPS)xl SET(TEXT)SET(UID) TPUMr 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 N specify this parameter, the previously defined, program is deleted.C buffer2 The buffer containing TPU 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.B range The range containing TPU statements to beJ O 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.C string The string containing TPU 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 learPn 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 e1 SET(SCREEN_LIMITS) SET(SCREEN_LIMITS)H Specifies the minimum and maximum allowable sizes for the screen duringE resize operations. TPU passes these limitsQ 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 less tha Rn 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 DECwindows, bu St if present, must be accompanied by elementH four. Not specifying element three and four allow the MotifF window manager to make the TPU 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 DECwindows.wwT e1 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 or 1 Enables sc Ureen or window updates, so characters and cursorE movement are sent to the screen. This causes TPU 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 thatE share the screen between TPU and some other code, such as FMS orG DECForms. Such 'clear' wVindows tell TPU 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 erased or modifiWed 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 X . .6 SET (SCREEN_UPDATE, ON); ! Turn updates back onD The following statements prevent TPU 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 (SCREEN_UPDATE, OFF, clear_windoYw); ! Turn off updates . .D SET (SCREEN_UPDATE, ON, clear_window); ! Turn updates back onww e1 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 vertical orH Z horizontal scroll bar associated with a window.B widget The value 0 if an error prevents TPU from> associating a widget with the window.G SCROLL_BAR A keyword directing TPU to enable or disable a4 scroll bar in a TPU window.H window The window in which the scroll bar does or does$ not appear.G HORIZONTAL A keyword directing TPU to enable or disabl[e a/ horizontal scroll bar.G VERTICAL A keyword directing TPU 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.ww1 SET(SCROLL_BAR_AUT\O_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}) ParametersF SCROLL_BAR_AUTO_THUMB A keyword directing TPU to enable or disableI automatic adjustment of a scroll bar slider in a$ TPU window.H window The window whose scroll bar slider you want TPU# ] to adjust.G HORIZONTAL A keyword directing TPU to set the slider on a/ horizontal scroll bar.G VERTICAL A keyword directing TPU to set the slider on a- vertical scroll bar.D ON A keyword directing TPU to enable automatic= adjustment of the scroll bar slider.E OFF A keyword directing TPU to disable automatic= ^ adjustment of the scroll bar slider.ww1 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 horizontal movement duringH scrolling--the cursor remains in th _e 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 youA can set TPU 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 terminalF to SMOOTH SCROLL and set TPU scrolling mode to the jump setting, textK slides smoothly out of th`e 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 otherwise occur.! ON Enables scrolling.A integer1 a 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 line of the window,J identifying the bottom limit of an barea 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 cursor should be positioned when a window is scrolled. For cK 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.H JUMP A keyword indicating that TPU should not repaint scrolledG text until all currently specified scroll operations areG completed. When scrolling is set to jump mode, scrolledC text appears dto 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.F SMOOTH A keyword indicating that, during scrolling, TPU shouldF r eepaint 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> indicates that the smooth setting is in effect. Examples/ 1. S fET (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, 0, 0, 21);I Does the same thing as Example 1 -- except, if the main wgindow 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);G Causes TPU to refrain from repainting any new lines of text duringH scrolling until all currently specified scroll operations have been completed. Related topics8 GET_INFO(SCREEN) SCROLL SEhT(CROSS_WINDOW_BOUNDS) SET(FORWARD) SET(REVERSE)ww1 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 OFF Disables self-inserting, causing the UNDEFINE_KEY procedureB i 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 (CURRENT_BUFFER, "key_map_list");4 IF GET_INFO (the_key_map_list, "seljf_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)ww1 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 keyboard. Syntax& SET (SHIFT_KEY, keyname [,string]) Parameters kG 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 the shift key and the other key; the other bindingI is executed when you pres ls 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.H Only one shift key can be active at a time. By default, PF1 is the TPU@ shift key. If you want to use PF1 for another purpose, use SETI (SHIFT_KEY) to specify a key other than PF1. You can use any kmey as theE shift key, as long as TPU 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 topics4 DEFINE_KEY KEY_NAME SHIFT_KEY UNDEFINE_KEYww1 SET(nSPECIAL_ERROR_SYMBOL) SET(SPECIAL_ERROR_SYMBOL)D Designates the global variable that you want TPU to set to 0 when a+ case-style error handler handles a CTRL/C. Syntax# SET (SPECIAL_ERROR_SYMBOL, string) ParameterG string The name of the global variable that you want TPU to set; to 0 when an error handler handles a CTRL/C. CommentsK Once you designate the variable that is to be the special error symbol,G TPU sets the variable to 0 if eith oer of the following events occur:E o TPU executes the TPU$_CONTROLC selector in a case-style error handler, orG o TPU 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 SET> statement. TPU does not clear the variable in response to" non-case-style error handlers.pG The variable specified by SET (SPECIAL_ERROR_SYMBOL) can be used toD determine whether TPU has exited from current procedures and has+ returned to waiting for a new keypress. ExampleH The following statement designates the global variable "mork" as theH variable to be cleared if TPU executes the TPU$_CONTROLC selector in a case-style error handler:$ SET (SPECIAL_ERROR_SYMBOL, mork)ww1 SET(STATUS_LINE) SET(STATUS_LINE)H Sets or chaqnges 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 no video attributes to the characters.) BOLD To make characters bolded.( BLINK To ma rke 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 the video terminal you are using.G string The text to be displayed on the status line (such as stheI 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 Removes the status line for the second window by setting the final parameter to a null string.G 3. The ftollowing 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);ww,1 SET(SUCCESS) SET(SUCCESS)1 Enables or disables display of success messages. Syntax SET (SUCCESS {OFF | ON}) Parameters/ OFF Disablues 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)ww, 1 SET(SYSTEM) SET(SYSTEM)G Makes a buffer a system buffer. This is useful when creating your ownH editor in which you want to distinguish system buffers, such as a pasteD buffer, frovm those that users can edit. TPU does not handle systemG buffers differently from user buffers; TPU merely keeps track of whichG buffers have been designated as system buffers. It is the application9 layered onto TPU 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 SET (SYSTEM, buffer) ExampleD The following statements create a paste buffer and make it a system buffer:w, paste_buffer := CREATE_BUFFER ("paste"); SET (SYSTEM, paste_buffer); Related topicsD SET(MODIFIABLE) SET(NO_WRITE) SET(OUTPUT_FILE) SET(SYSTEM)ww,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 for which you want to set tab stops.I string A string of numbers specifying the tab stops. The minimumJ x 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 (TAyB_STOPS, main_buffer, 4);B Sets tab stops for the main buffer at intervals of 4 columns.ww, 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 ar ze 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 translation. Any escapeG sequences in the text are transmitted. TPU 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 gra |phic 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 rest}ore 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;ww, 1 SET(TIMER) SET(TIMER)H Enables or disables display of flashing messages in the prompt area.E When display of these messages is enabled, the TPU timer display~s3 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.wwHlSET(SPECIAL_ERROR_SYMBOL)oSET(STATUS_LINE)sH SET(SUCCESS)t, SET(SYSTEM)vSET(TAB_STOPS)xl SET(TEXT)|@ SET(TIMER)~SET(TRACEBACK)SET(UID) SET(UNDEFINED_KEY)h SET(VIDEO) SET(WIDGET)SET(WIDGET_CALLBACK)xSET(WIDGET_CALL_DATA)(SET(WIDGET_CONTEXT_HELP)SET(WIDGET_RESOURCE_TYPES) SET(WIDTH)vSHIFT$SHOWSLEEPSPANSPANLSPAWN  SPLIT_LINEHSTRnSUBSTR TPU,1 SET(TRACEBACK) SET(TRACEBACK)G Determines whether TPU includes the procedure calling sequence when" an error message is displayed. Syntax SET (TRACEBACK, {ON | OFF} ParametersD ON Causes TPU to include the procedure callingK sequence preceding the error when an error messageJ is displayed. If no section file was loaded whenD TPU was invoked, the default setting is ON.H OFF Suppresses the display of the procedure callingK sequence in error messages. If a section file wasA loaded when TPU 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) ParametersG WIDGET A keyword directing TPU to set an attribute of" a widget.J widget The widget instance whose values 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)D Allows you to create a template telling TPU 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 isA being used to control how TPU interpretsK information in a widget's callback data structure.K widget The specific widget instance for whic h 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 field 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 theB TPU data type to which TPU 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 keywordG parameter to inform TPU, for each field of theK structure, what data type the field has originallyB and what TPU 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 "int" INTEGER or UNSPECIFIEDG "short" INTEGER or UNSPECIFIEDG "void"  UNSPECIFIEDG "widget" WIDGET or UNSPECIFIED CommentsH You use SET (WIDGET_CALL_DATA) to tell TPU 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 callbackC generated by the specified widget for the specified reason, TPUB interprets the data in the callback structure according to the description you create.D In an application layered on TPU, 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_DATA) built-in for each reason code. If you specifyG the same widget and reason code in more than one call, TPU 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 for the reason field. InI almost all cases, you specify the event field with the request stringJ "void" and the keyword UNSPECIFIED. Specify all subsequen t 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 TPU.G Although you can skip trailing fields, you cannot skip intermediateG fields even if they are unimportant to your application. To directC TPU to ignore the information in a given field, use the requestI string "void" and the keyword UNSPECIFIE D 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 VSI 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 nextH statement tells TPU how to interpret the fields of the callback dataH structure associated with a List Box widget assigned to the variableH "initial_list_box". The statement directs TPU 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)E Specifies the TPU program or learn sequence to be called by TPU when2 a widget callback occurs for the widget instance. Syntax: SET (WIDGET_CALLBACK, widget, program_source, closure)  Parameters; WIDGET_CALLBACK A keyword directing TPU 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 TPU.F closure A string or integer. TPU passes the value toC the application when the widget performs a) callback to TPU. 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");wwL1 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 (WIDGET_CONTEXT_HELP, widget, {ON | 1 | OFF | 0}) ParametersC WIDGET_CONTEXT_HELP A keyword directing TPU to enter the MotifG context-sensitive help mode in wh ich 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 specifi ed 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 the@ top level TPU widget. This lets the pointer be moved to theA application dialog boxes that have been moved outside the TPU boundaries.@ SET (WIDGET_CONTEXT_HELP, GET_INFO (SCREEN, "widget"), OFF);wwL1 SET(WIDGET_RESOURCE_TYPES) SET (WIDGET_RESOURCE_TYPES)G Adds new widget resource types to the list of types that TPU supports.6 This built-in is valid only in the Motif environment. SyntaxH SET (WIDGET_RESOURCE_TYPES, widget_data_type, widget_resource_types) ParameterB WIDGET_RESOURCE_TYPES A keyword directing TPU to add new MotifG widget resource types to the list of supportedI resource types. If you redefine a resource typeD to be of another data type, TPU signals theE  warning TPU$_TYPEREDEFINED. You cannot saveB resources in section files. TPU 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. ItE tells TPU how to process the resource types.? TPU 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 anyE  valid TPU 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")wwL 1 SET(WIDTH) SET(WIDTH)I Sets the width of a window. If a window is wider than the screen and ifH the window contains text off the right edge of the screen, TPU 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.F ALL A keyword indicating that TPU should set the screen andJ all windows, visible and invisible, to the specified width.E SCREEN A keyword indicating that TPU should set the screen toG the specified width without altering the size of any TPUG 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 TPU 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)wwL1 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 TPU 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.wwL1 SHOW SHOWJ Shows information about a datatype, keyword, or current settings that can be applied to some datatypes. Syntax SHOW ({datatype | keyword} ParametersF dataty pe The variable to which a TPU 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 information 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 PROCEDURES To show the names of all defined procedures.E SCREEN To show information about the terminal.F SUMMARY To show statistics and other informationE about TPU includ ing 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);H Shows, on the screen, a list of all TPU 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 SLEEPC Causes TPU to pause for the amount of time specified. SLEEP isE useful for suspending screen action while a message is displayed. Syntax SLEEP ({integer | string}) ParametersB integer The number of seconds for which TPU is to pause.E string A delta or absolute time indicating how longF TPU 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 number 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 isB pending when TPU encounters SLEEP, TPU does not pause. If the< user types in input during a pause, TPU stops the SLEEP. ExamplesD 1. The following statement causes TPU to pause for two seconds. SLEEP (2);H 2. The following statement causes TPU 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}]) ParametersG string  A string containing the characters that TPU is7 to match in the searched text.F range A range containing the characters that TPU is7 to match in the searched text.G buffer A buffer containing the characters that TPU is7 to match in the searched text.G FORWARD A keyword directing TPU to match characters in/ the forward direction .G REVERSE A keyword directing TPU to match characters asI follows: First, match characters in the forwardF direction until TPU 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 untilC TPU finds a character not in the specifiedK buffer, range, or string. You can specify REVERSEK only if you 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 f orm 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. ByE specifying REVERSE with SPAN, you direct TPUJ not to stop matching in either direction until itD has matched as many characters as possible. CommentsI SP AN 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, RE VERSE);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 first 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}]) ParametersG string A string containing the characters that TPU is7 to match in the searched text.F range A range containing the characters t hat TPU is7 to match in the searched text.G buffer A buffer containing the characters that TPU is7 to match in the searched text.G FORWARD A keyword directing TPU to match characters in/ the forward direction.G REVERSE A keyword directing TPU to match characters asI follows: First, match characters in the forwardF  direction until TPU 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 theF reverse direction until TPU 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 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. ByF specifying REVERSE with SPANL, you direct TPUJ 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 ('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", t hen 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 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 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 created.E When the command is completed, the subprocess ends and2 control returns to the TPU process.H ON Specifies that control is to be returned to TPU after theI subprocess has terminated. This is the default unless the: null string is used as th e 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 theA TPU 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 TPU session. Related topics- ATTACH CREATE_PROCESS SEND SEND_EOFwwlO 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_LINEwwlO1 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.B integer2 The radix (base) you want TPU 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 contents 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. E very line break in theF buffer or range is replaced by the string youI specify. The end of the last line in the bufferC or range is not replaced by the string you! specify.D ON A keyword directing TPU 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.G OFF A keyword directing TPU 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 SUBSTRwwlO1 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. If> you do not specify this parameter , TPU sets theH substring's end point at the end of the specified buffer, range, or string. Example, file_type := SUBSTR ("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,G the 4), TPU sets the substring's end point at the end of the string "login.com". Related topics ASCII FAO INT STRwwlO 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 cannot 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.D IN_PLACE  A keyword directing TPU to make the indicatedH change in the buffer, range, or string specified.+ This is the default.E NOT_IN_PLACE A keyword directing TPU 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 bu ffer. To use NOT_IN_PLACE, you must< specify a return value for TRANSLATE.G returned_buffer A variable of type buffer 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 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. 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 followin g 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|v 1 UNANCHOR UNANCHORI Specifies that a search may match a pattern at any positLSET(WIDGET_RESOURCE_TYPES) SET(WIDTH)vSHIFT$SHOWSLEEPSPANSPANLSPAWN  SPLIT_LINEHSTRnSUBSTR TPU TRANSLATEUNANCHOR UNDEFINE_KEYUNMANAGE_WIDGETUNMAPzUPDATE@WRITE_CLIPBOARD2 WRITE_FILEWRITE_GLOBAL_SELECT ion after the current position.A UNANCHOR is a keyword, not a built-in. It has no parameters.I If a pattern contains two or more 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|v1 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));H Undefines the combination of the TPU shift key (by default, PF1) and the letter R. Related topics> DEFINE_KEY KEYNAMES TABLE NONDEFINABLE KEYS SHIFT_KEYww|v1 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|v1 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 unmapped window is either erased or returned to any windows$ occluded by the unmapped window.A If you unmap the current window, TPU tries to move the cursorJ position to the window that was most recently the current window. TheF window in which TPU 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 unmapped? DECwindows window is TPU's top-level DECwindows window, TPUK 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|v1 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 wi ndow 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|v1 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 theD clipboard. TPU represents line breaks by aK line-feed character (ASCII (10)). The buffer mustJ contain at least one character or line break. IfE it does not, TPU signals TPU$_CLIPBOARDZERO.G range The range containing text to be written to theC  clipboard. TPU represent line breaks by aJ line-feed character (ASCII (10)). The range mustJ contain at least one character or line break. IfE it does not, TPU signals TPU$_CLIPBOARDZERO.H string The string containing text to be written to theI clipboard. The string must contain at least one@ character. If it does not, TPU signals,  TPU$_CLIPBOARDZERO.ww|v 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 y ou want to write to a file.K string1 The output file specification. If you do not specify aF file, TPU uses the output file associated with theG buffer. If there is no associated output file, TPU$ 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)ww1 WRITE_GLOBAL_SELECT WRITE_GLOBAL_SELECTB Sends requested information about a global selection from the TPUC layered application to the application that issued the information request. Syntax L WRITE_GLOBAL_SELECT ({array | buffer | range | string | integer | NONE}) ParametersD array An array passing information about a globalK selection whose contents describe information thatE is not of a data type supported by TPU. 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 TPU.I buffer The buffer containing the information to be sentI to the requesting application as the response toG the global selection information request. TPU@ sends the information in string format.K range The range containing the information to be sent toJ the r equesting application as the response to theC global selection information request. TPU@ sends the information in string format.I string The string containing the information to be sentI to the requesting application as the response toG the global selection information request. TPU@ 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 selectionH information request. TPU 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 g lobal 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