Compaq AA-PWCBD-TE - Manuals
Compaq AA-PWCBD-TE – Manual in PDF format online.
Manuals:
Manual Compaq AA-PWCBD-TE
Summary
Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix 1 Overview of the DEC Text Processing Utility 1.1 Description of DECTPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–1 1.1.1 ...
2.6.8 /JOURNAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–14 2.6.9 /MODIFY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–15 2.6.10 /OUTPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
4.4 Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–5 4.5 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–5 4.6 Constants . . . . . . . . . . . . . . . . . . . . . . . . . ...
5.2.3 Global Selection Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6 5.2.3.1 Difference Between Global Selection and Clipboard . . . . . . . . . . . . 5–6 5.2.3.2 Handling of Multiple Global Selections . . . . . . . . . . . . . . . . . . . . . 5–6 5.2.3.3 Relation...
A Sample DECTPU Procedures A.1 Line-Mode Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A–1 A.2 Translation of Control Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A–2 A.3 Restoring Terminal Width Before Exiting from DECTPU ...
A–1 Line-Mode Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A–1 A–2 Procedure to Display Control Characters . . . . . . . . . . . . . . . . . . . . . . . A–2 A–3 Procedure to Restore Screen to Original Width . . . . . . . . . . . . . . . . . . A–6 A–4 Proced...
Preface This manual discusses the DEC Text Processing Utility (DECTPU). Intended Audience This manual is for experienced programmers who know at least one computerlanguage, as well as for new users of DECTPU. Some features of DECTPU, forexample, the callable interface and the built-in procedure FILE...
Mail Compaq Computer CorporationOSSG Documentation Group, ZKO3-4/U08110 Spit Brook Rd.Nashua, NH 03062-2698 How To Order Additional Documentation Use the following World Wide Web address to order additional documentation: http://www.openvms.compaq.com/ If you need help deciding which documentation b...
bold text This text style represents the introduction of a new term or thename of an argument, an attribute, or a reason. italic text Italic text indicates important information, complete titlesof manuals, or variables. Variables include information thatvaries in system output (Internal error number...
1 Overview of the DEC Text Processing Utility This chapter presents information about the DEC Text Processing Utility(DECTPU). The chapter includes the following: • A description of DECTPU • A description of DECwindows DECTPU • A description of the Extensible Versatile Editor (EVE) • Information abo...
Overview of the DEC Text Processing Utility1.1 Description of DECTPU • Free or bound cursor motion • Learn sequences • Pattern matching • Key definition • Procedural language • Callable interface 1.1.2 DECTPU and User Applications DECTPU is a language that you can use as a base on which to layer tex...
Overview of the DEC Text Processing Utility 1.2 Description of DECwindows DECTPU 1.2.1 DECwindows DECTPU and DECwindows Features The DECwindows environment has a number of toolkits and libraries that containroutines for creating and manipulating DECwindows interfaces. DECwindowsDECTPU contains a num...
Overview of the DEC Text Processing Utility1.2 Description of DECwindows DECTPU The DECwindows version of DECTPU does not provide access to all of thefeatures of DECwindows. For example, there are no DECTPU built-in proceduresto handle floating-point numbers or to manipulate entities such as lines, ...
Overview of the DEC Text Processing Utility 1.3 Description of EVE Figure 1–2 DECTPU as a Base for User-Written Interfaces ZK−6544−GE D E C T P U Application User−Written Editor EVE to EVE Extensions User−Written You can implement extensions to EVE with any of the following: • A DECTPU command file ...
Overview of the DEC Text Processing Utility1.4 DECTPU Language 1.4.1 Data Types The DECTPU language has an extensive set of data types. You use data types tointerpret the meaning of the contents of a variable. Unlike many languages, theDECTPU language has no declarative statement to enforce which da...
Overview of the DEC Text Processing Utility 1.4 DECTPU Language 1.4.5 User-Written Procedures You can write your own procedures that combine DECTPU language statementsand calls to DECTPU built-in procedures. DECTPU procedures can return valuesand can be recursive. After you write a procedure and com...
Overview of the DEC Text Processing Utility1.6 Learning Path for DECTPU 1.6 Learning Path for DECTPU The suggested path for learning to use DECTPU is to first read thedocumentation describing EVE if you are not familiar with that editor. TheDECTPU/EVE documentation contains both reference and tutori...
2 Getting Started with DECTPU This chapter describes the following: • Invoking DECTPU on OpenVMS systems • Invoking DECTPU from a DCL command procedure • Invoking DECTPU from a batch job • Using journal files • Avoiding errors related to virtual address space • Using OpenVMS command line qualifiers ...
Getting Started with DECTPU2.1 Invoking DECTPU on OpenVMS Systems 2.1.1 Default File Specifications Table 2–1 lists the default TPU and EVE file specifications on OpenVMS systems. Table 2–1 Default File Specifications on OpenVMS Systems File OpenVMS File Specification Section SYS$SHARE:TPU$SECTION.T...
Getting Started with DECTPU 2.1 Invoking DECTPU on OpenVMS Systems Note When you invoke DECTPU with the /NOSECTION qualifier, DECTPUdoes not use any binary file to provide an interface. Even the Return andDelete keys are not defined. Use /NOSECTION when you are running astandalone command file or wh...
Getting Started with DECTPU2.2 Invoking DECTPU from a DCL Command Procedure Example 2–1 shows a DCL command procedure that ‘‘remembers’’ the last filethat you were editing and uses it as the input file for DECTPU. When you edit afile, the file name you specify is saved in the DCL symbol last_file_ed...
Getting Started with DECTPU 2.2 Invoking DECTPU from a DCL Command Procedure Example 2–3 DCL Command Procedure INVISIBLE_TPU.COM ! This command procedure invokes DECTPU without an editor.! The file GSR.TPU contains the edits to be made.! Specify the file to which you want the edits made as p1.!$ EDI...
Getting Started with DECTPU2.3 Invoking DECTPU from a Batch Job 2.3 Invoking DECTPU from a Batch Job If you want your edits to be made in batch rather than at the terminal, you canuse the DCL command SUBMIT to send your job to a batch queue. For example, if you want to use the file GSR.TPU (shown in...
Getting Started with DECTPU 2.4 Using Journal Files 2.4.1 Keystroke Journaling In keystroke journaling, DECTPU keeps track of each keystroke made duringa session, regardless of which buffer is in use. If a system interruption occursduring a session, you can reconstruct the work done during the sessi...
Getting Started with DECTPU2.4 Using Journal Files 2.4.3 Buffer-Change Journal File-Naming Algorithm By default, DECTPU creates the buffer-change journal file name by using thefollowing algorithm: 1. Converts all characters in the buffer name that are not alphanumeric, adollar sign, underscore, or h...
Getting Started with DECTPU 2.5 Avoiding Errors Related to Virtual Address Space DECTPU keeps strings in a different virtual pool than it does other memory.Once DECTPU starts writing to the work file, the size of the string memory poolis fixed. DECTPU cannot write strings to the work file, so if it ...
Getting Started with DECTPU2.6 Using OpenVMS EDIT/TPU Command Qualifiers The choice of character set also affects how your text appears when printed. Forthe text displayed in DECTPU to look the same when printed, you must choosethe same character set for both DECTPU and the printer. There are two wa...
Getting Started with DECTPU 2.6 Using OpenVMS EDIT/TPU Command Qualifiers By default, DECTPU tries to read a command file called TPU$COMMAND.TPUin your default directory. You can use a full file specification after the/COMMAND qualifier or define the logical name TPU$COMMAND to pointto a command fil...
Getting Started with DECTPU2.6 Using OpenVMS EDIT/TPU Command Qualifiers By default, EVE creates a new file if the specified input file does not exist. If youuse /NOCREATE and specify an input file that does not exist, EVE aborts theediting session and returns you to the DCL command level. For examp...
Getting Started with DECTPU 2.6 Using OpenVMS EDIT/TPU Command Qualifiers The /NODISPLAY qualifier causes DECTPU to run without using the screendisplay and the keyboard functions of a terminal. Use /NODISPLAY in thefollowing cases: • When running DECTPU procedures in a batch job • When using DECTPU ...
Getting Started with DECTPU2.6 Using OpenVMS EDIT/TPU Command Qualifiers 2.6.7 /INTERFACE The /INTERFACE qualifier determines the interface or screen display you want(same as /DISPLAY). The default is CHARACTER_CELL. For example, to invoke EVE with the DECwindows interface, use the followingcommand:...
Getting Started with DECTPU 2.6 Using OpenVMS EDIT/TPU Command Qualifiers $ EDIT/TPU/NOJOURNAL memo.txt If you are developing an application layered on DECTPU, you can use the built-inJOURNAL_OPEN to direct DECTPU to create a keystroke journal file for anediting session. Using JOURNAL_OPEN causes DE...
Getting Started with DECTPU2.6 Using OpenVMS EDIT/TPU Command Qualifiers If you invoke EVE and do not specify /MODIFY, /NOMODIFY, /READ_ONLY, or/NOWRITE, EVE makes the first user buffer of the editing session modifiable.If you specify /NOMODIFY, EVE makes the first user buffer unmodifiable.Regardles...
Getting Started with DECTPU 2.6 Using OpenVMS EDIT/TPU Command Qualifiers Using /NOOUTPUT, you can develop an application that lets you control theoutput of a file. For example, an application could be coded so that if you specify/NOOUTPUT on the DCL command line, DECTPU would set the NO_WRITEattrib...
Getting Started with DECTPU2.6 Using OpenVMS EDIT/TPU Command Qualifiers 2.6.12 /RECOVER /RECOVER /NORECOVER (default) The /RECOVER qualifier determines whether DECTPU reads a keystrokejournal file at the start of an editing session to recover edits made during aprior interrupted editing session. Fo...
Getting Started with DECTPU 2.6 Using OpenVMS EDIT/TPU Command Qualifiers $ EDIT/TPU/RECOVER/JOURNAL=save.TJL letter.dat In EVE, you can use /RECOVER to recover either an editing session from akeystroke journal file or a single buffer from a buffer-change journal file. If youspecify /JOURNAL=filenam...
Getting Started with DECTPU2.6 Using OpenVMS EDIT/TPU Command Qualifiers If you specify the /NOSECTION qualifier, DECTPU does not load a section file.Unless you use the /COMMAND qualifier with /NOSECTION, DECTPU has nouser interface and no keys are defined. In this state, the only way to exit fromDE...
3 DEC Text Processing Utility Data Types A data type is a group of elements that ‘‘belong together’’; the elements are allformed in the same way and are treated consistently. The data type of a variabledetermines the operations that can be performed on it. The DECTPU data typesare represented by the...
DEC Text Processing Utility Data Types3.1 Array Data Type 3.1 Array Data Type An array is a structure for storing and manipulating a group of elements. Theseelements can be of any data type. You create arrays with the CREATE_ARRAYbuilt-in procedure. For example, the following statement creates the a...
DEC Text Processing Utility Data Types 3.1 Array Data Type int_array := CREATE_ARRAY (10, 1);int_array {1} := "Store a string in the first element";int_array {8} := CURRENT_BUFFER;int_array {42} := "This is a dynamically created element."; If you assign a value to an element that has...
DEC Text Processing Utility Data Types3.2 Buffer Data Type In this statement, my_buf is the identifier for the variable my_buf. The string " my_buffer " is the name associated with the buffer. The distinction between the name of the buffer variable and the name of the buffer is useful when y...
DEC Text Processing Utility Data Types 3.3 Integer Data Type DECTPU also supports binary, octal, and hexadecimal integers. Binary integersare preceded by %b or %B, octal by %o or %O, and hexadecimal by %x or %X.Thus, all the following statements are acceptable: x := %B10000;x := %o20;x := %X130;x :=...
DEC Text Processing Utility Data Types3.4 Keyword Data Type Table 3–1 shows the correspondence between keywords used as DECTPUkey names and the keys on the VT400, VT300, VT200, and VT100 series ofkeyboards. You do not have to define a key or control sequence just because thereis a DECTPU keyword for...
DEC Text Processing Utility Data Types3.5 Learn Data Type To enable your user-written DECTPU procedures to work successfully withlearn sequences, you must observe the following coding rules when you writeprocedures that you or someone else can bind to a key: • The procedure should return true or fal...
DEC Text Processing Utility Data Types 3.6 Marker Data Type A marker is bound if there is a character in the position marked by the editingpoint at the time you create the marker. A bound marker is tied to the characteron which it is created. If you move the character to which a marker is bound, the...
DEC Text Processing Utility Data Types3.6 Marker Data Type • ERASE_LINE • MOVE_HORIZONTAL • MOVE_TEXT • MOVE_VERTICAL • SELECT • SELECT_RANGE • SPLIT_LINE Example 3–1 shows how to suppress padding while using these built-ins. Theexample assumes that the editing point is free. The code in this exampl...
DEC Text Processing Utility Data Types 3.7 Pattern Data Type To create a pattern, use DECTPU pattern operators (+, &, | , @) to connect any ofthe following: • String constants • String variables • Pattern variables • Calls to pattern built-in procedures • The following keywords: ANCHOR BUFFER_BE...
DEC Text Processing Utility Data Types3.7 Pattern Data Type for the pattern, the built-in returns a range that contains the text that matchesthe pattern. You can assign the range to a variable. The following example uses strings and pattern operators to create a pattern thatis stored in the variable...
DEC Text Processing Utility Data Types 3.7 Pattern Data Type 3.7.3 Using Pattern Operators The following are the DECTPU pattern operators: • Concatenation operator ( + ) • Link operator ( & ) • Alternation operator ( | ) • Partial pattern assignment operator ( @ ) The pattern operators are equal...
DEC Text Processing Utility Data Types3.7 Pattern Data Type Given this sequence of definitions, a search for pat_var succeeds if DECTPUencounters the following string: a5xcd Because two pattern variables are linked, DECTPU searches first for the textthat matches p1, then unanchors the search, and th...
DEC Text Processing Utility Data Types 3.7 Pattern Data Type pat1 := "abc" + (arb(2) @ var1) + remain; SEARCH or SEARCH_QUIETLY also assigns to var1 a range that contains thetext de. If you assign to a variable a partial pattern that matches a position, ratherthan a character, the partial pa...
DEC Text Processing Utility Data Types3.7 Pattern Data Type Given this definition, the following patterns match the same text but are notequal: pat1 := LINE_BEGIN + ANY ("abc");pat2 := LINE_BEGIN + this_pat; 3.7.4 Compiling and Executing Patterns When you execute a DECTPU statement that cont...
DEC Text Processing Utility Data Types 3.7 Pattern Data Type 3.7.6 Anchoring a Pattern Anchoring a pattern forces SEARCH or SEARCH_QUIETLY to match theanchored part of the pattern to text starting at the current search position. Ifthe anchored part of a pattern fails to match that text, SEARCH or SE...
DEC Text Processing Utility Data Types3.8 Process Data Type 3.8 Process Data Type The CREATE_PROCESS built-in procedure returns a value of the process datatype. A DECTPU process runs as a subprocess. DECTPU processes have the same restrictions that OpenVMS subprocesses have.Following are some of the...
DEC Text Processing Utility Data Types 3.10 Range Data Type 3.10 Range Data Type A range contains all the text between (and including) two markers. You canform a range with the CREATE_RANGE built-in procedure. A range is associatedwith characters within a buffer. If the characters within a range mov...
DEC Text Processing Utility Data Types3.10 Range Data Type The following example assigns a value of the range data type to the variable x: x := CREATE_RANGE (mark1, mark2, UNDERLINE); You can specify the video attribute with which DECTPU should display a range.The possible attributes are BLINK, BOLD...
DEC Text Processing Utility Data Types 3.11 String Data Type The maximum length for a string is 65,535 characters. A restriction of theDECTPU compiler is that a string constant (an open quotation mark, somecharacters, and a close quotation mark) must have both its opening and closingquotation marks ...
DEC Text Processing Utility Data Types3.12 Unspecified Data Type To give a variable the data type unspecified, assign the predefined constantTPU$K_UNSPECIFIED to the variable: prog := TPU$K_UNSPECIFIED; 3.13 Widget Data Type The DECwindows version of DECTPU provides the widget data type to supportDE...
DEC Text Processing Utility Data Types 3.14 Window Data Type 3.14.1 Defining Window Dimensions Windows are defined in lines and columns. In EVE, all windows extend the fullwidth of the screen or terminal emulator. In DECTPU, you can set the windowwidth to be narrower than the width of the screen or ...
DEC Text Processing Utility Data Types3.14 Window Data Type 3.14.3 Displaying Window Values When you use the CREATE_WINDOW built-in procedure to create a window,DECTPU saves the numbers of the screen lines that delimit the window inoriginal_top and original_bottom. When you map a window to the scree...
DEC Text Processing Utility Data Types 3.14 Window Data Type For more information on the cursor position in a window and the POSITIONbuilt-in procedure, see the DEC Text Processing Utility Reference Manual. 3.14.5 Removing Windows To remove a window from the screen, you can use either the UNMAP buil...
DEC Text Processing Utility Data Types3.14 Window Data Type 3.14.8 Terminals That Do Not Support Windows DECTPU supports windows only for ANSI character-cell terminals.Noncharacter-cell terminals do not support windows and are considered‘‘unsupported devices.’’ If you are using an unsupported device...
4 Lexical Elements of the DEC Text Processing Utility Language 4.1 Overview A DECTPU program is composed of lexical elements. A lexical element may be an individual character, such as an arithmetic operator, or it may be a group ofcharacters, such as an identifier. The basic unit of a lexical elemen...
Lexical Elements of the DEC Text Processing Utility Language4.3 Character Sets 4.3 Character Sets When you invoke DECTPU, you can use one of the following keywords with the/CHARACTER_SET qualifier to specify the character set that you want DECTPUto use: • DEC_MCS (for the DEC Multinational Character...
Lexical Elements of the DEC Text Processing Utility Language 4.3 Character Sets 4.3.2 ISO Latin1 Character Set (ISO_LATIN1) The ISO Latin1 Character Set characters from 128 to 255 are extended controlcharacters and Latin1 supplemental multinational characters. Table 4–3 showsthe groups into which yo...
Lexical Elements of the DEC Text Processing Utility Language4.3 Character Sets For example: GOLD 27 GOLD Specins 4.3.5 DECTPU Symbols Certain symbols have special meanings in DECTPU. You can use them asstatement delimiters, operators, or other syntactic elements. Table 4–4 lists theDECTPU symbols an...
Lexical Elements of the DEC Text Processing Utility Language 4.4 Identifiers 4.4 Identifiers In DECTPU, identifiers are used to name programs, procedures, keywords, andvariables. An identifier is a combination of alphabetic characters, digits, dollarsigns, and underscores, and it must conform to the...
Lexical Elements of the DEC Text Processing Utility Language4.5 Variables The global variable user_tab_char is assigned a value when the procedure user_tab is executing. Since the variable is a global variable, it could have beenassigned a value outside the procedure user_tab. The local variable thi...
Lexical Elements of the DEC Text Processing Utility Language 4.6 Constants Example 4–2 (Cont.) Global and Local Constant Declarations PROCEDURE user_hello_worldCONSTANT world := "world"; MESSAGE (user_hello + " " + world); ! Display "Hello world" ! in message area ENDPROCEDUR...
Lexical Elements of the DEC Text Processing Utility Language4.7 Operators Table 4–5 (Cont.) DECTPU Operators Type Symbol Description + Pattern concatenation & Pattern linkage Logical AND Boolean AND NOT Boolean NOT OR Boolean OR XOR Boolean exclusive OR You can use the + operator to concatenate ...
Lexical Elements of the DEC Text Processing Utility Language 4.8 Expressions • You can mix data types when using the not equal (<>) and equal ( = )relational operators. • You can mix strings and integers when doing string replication. Except for these cases, DECTPU does not perform implicit ty...
Lexical Elements of the DEC Text Processing Utility Language4.8 Expressions There are four types of DECTPU expressions: • Arithmetic • Relational • Pattern • Boolean The following sections discuss each of these expression types. 4.8.1 Arithmetic Expressions You can use any of the arithmetic operator...
Lexical Elements of the DEC Text Processing Utility Language 4.8 Expressions When used with markers, these operators test whether one marker is closerto (or farther from) the top of the buffer than another marker. (If markers arein different buffers, they will return as false.) For example, the proc...
Lexical Elements of the DEC Text Processing Utility Language4.8 Expressions A true value in DECTPU is any odd integer; a false value is any even integer. Usethe logical operators (AND, NOT, OR, XOR) to combine one or more expressions.DECTPU evaluates Boolean expressions enclosed in parentheses befor...
Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words • TPU$K_HELP_MODIFIED • TPU$K_MESSAGE_FACILITY • TPU$K_MESSAGE_ID • TPU$K_MESSAGE_SEVERITY • TPU$K_MESSAGE_TEXT • TPU$K_SEARCH_CASE • TPU$K_SEARCH_DIACRITICAL • TPU$K_SHIFT_MODIFIED • TPU$K_UNSPECIFIED • TRUE 4.9.4 Decla...
Lexical Elements of the DEC Text Processing Utility Language4.9 Reserved Words ENDCASE • Error statement ON_ERROR ENDON_ERROR • RETURN statement • ABORT statement • Miscellaneous declarations EQUIVALENCE LOCAL CONSTANT VARIABLE GLOBAL, UNIVERSAL, BEGIN, and END are words reserved for futureexpansion...
Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words 4.9.4.2 Procedure Declaration The PROCEDURE/ENDPROCEDURE declaration delimits a series of DECTPUstatements so they can be called as a unit. With the PROCEDURE/ENDPROCEDURE combination, you can declare a procedure with a ...
Lexical Elements of the DEC Text Processing Utility Language4.9 Reserved Words The scope of procedure parameters is limited to the procedure in which theyare defined. The maximum number of parameters in a parameter list is 127.A procedure can declare its parameters as required or optional. Requiredp...
Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words Example 4–5 Complex Procedure with Optional Parameters CONSTANT user_warning := 0, ! Warning severity code user_success := 1, ! Success severity code user_error := 2, ! Error severity code user_informational := 3, ! Info...
Lexical Elements of the DEC Text Processing Utility Language4.9 Reserved Words 4.9.4.5 Procedures That Return a Result Procedures that return a result are called function procedures. Example 4–6shows a procedure that returns a true ( 1 ) or false ( 0 ) value. Note All DECTPU procedures return a resu...
Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words Example 4–8 Recursive Procedure PROCEDURE user_reverseLOCAL temp_string; temp_string := READ_LINE("input>"); ! Read a response IF temp_string <> " " ! Quit if nothing entered! but the RETURN key....
Lexical Elements of the DEC Text Processing Utility Language4.9 Reserved Words 4.9.4.10 Assignment Statement The assignment statement assigns a value to a variable. In so doing, it associatesthe variable with the appropriate data type. Syntax identifier := expression; The assignment operator is a co...
Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words The ENDIF statement specifies the end of a conditional statement. Syntax IF expression THEN statement_1; . . . statement_n [[ELSE alternate-statement_1;. . . alternate-statement_n;]] ENDIF; You can use any DECTPU languag...
Lexical Elements of the DEC Text Processing Utility Language4.9 Reserved Words Syntax CASE case-selector [[FROMlower-constant-expr, TO upper-constant-expr]] [constant-expr_1 [[,...]]] : statement [[,...]];[constant-expr_2 [[,...]]] : statement [[,...]]; ... [constant-expr_n [[,...]]] : statement [[,...
Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words 4.9.4.14 Error Handling A block of code starting with ON_ERROR and ending with ENDON_ERRORdefines the actions that are to be taken when a procedure fails to executesuccessfully. Such a block of code is called an error ha...
Lexical Elements of the DEC Text Processing Utility Language4.9 Reserved Words • RETURN—This language statement stops the execution of the procedure inwhich the error occurred but continues execution of the rest of the program. If you do not specify ABORT or RETURN, the default is to continue execut...
Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words • If an error or warning is generated during a CALL_USER routine, ERROR isset to a keyword that represents the failure status of the routine, ERROR_LINE is set to the line number of the error, and ERROR_TEXT is set toa w...
Lexical Elements of the DEC Text Processing Utility Language4.9 Reserved Words Example 4–11 Procedure with a Case-Style Error Handler PROCEDURE eve$learn_abort ON_ERROR [TPU$_CONTROLC]: MESSAGE (ERROR_TEXT);RETURN (LEARN_ABORT); ENDON_ERROR; IF LEARN_ABORTTHEN eve$message (EVE$_LEARNABORT);RETURN (T...
Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words If the error or warning is trapped by a selector other than OTHERWISE,DECTPU does not place the error or warning message in the messagebuffer unless the error handler code instructs it to do so. In this case, aftersettin...
Lexical Elements of the DEC Text Processing Utility Language4.9 Reserved Words • If the error is not due to you pressing Ctrl/C, the error message is writtento the message buffer and DECTPU performs the equivalent of the followingsequence: special_error_symbol := 0;LEARN_ABORT;RETURN (FALSE); In a p...
Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words Example 4–13 Procedure That Returns a Status PROCEDURE user_at_end_of_line ! This procedure returns a 1 (true) if user is at the end of a! line, or a 0 (false) if the current character is not at the! end of a line ON_ERR...
Lexical Elements of the DEC Text Processing Utility Language4.9 Reserved Words Example 4–15 Simple Error Handler ON_ERROR MESSAGE ("Aborting procedure because of error.");ABORT; ENDON_ERROR; 4.9.5 Miscellaneous Declarations This section describes the following DECTPU language declarations: •...
Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words Syntax LOCAL variable-name [[,...]]; Local variables may also be declared in unbound code. Such variables areaccessible only within that unbound code. Unbound code can occur in the following places: • Module initializati...
Lexical Elements of the DEC Text Processing Utility Language4.9 Reserved Words If this code is included in TEMP.TPU, the following command demonstrates thescope of the various local variables: $EDIT/TPU/NOSECTION/NOINITIALIZE/NODISPLAY/COMMAND=temp.tpuStarting or ending the unbound, non-init codeSta...
Lexical Elements of the DEC Text Processing Utility Language 4.10 Lexical Keywords 4.10.1 Conditional Compilation The following lexical keywords control what code is compiled under differentconditions: • %IF • %IFDEF • %THEN • %ELSE • %ENDIF You use conditional compilation lexical keywords in a mann...
Lexical Elements of the DEC Text Processing Utility Language4.10 Lexical Keywords 4.10.2 Specifying the Radix of Numeric Constants You can specify constants with binary, octal, hexadecimal, and decimal radices. To specify a numeric constant in binary, precede the number with %B. Thenumber can consis...
5 DEC Text Processing Utility Program Development Previous chapters have described the lexical elements of the DECTPU language,such as data types, language statements, expressions, built-in procedures,and so on. This chapter describes how to combine these elements in DECTPUprograms. You can use DECT...
DEC Text Processing Utility Program Development5.1 Creating DECTPU Programs • You can use executable statements either within procedures or outsideprocedures. You must place all procedure declarations before any executablestatements that are not in procedures. • You can enter DECTPU statements from ...
DEC Text Processing Utility Program Development 5.1 Creating DECTPU Programs Other possible reasons for a TPU$_STACKOVER condition are that you have toomany statements that are not in procedures, or that you have too many smallprocedures. If you have too many small procedures, you must either consol...
DEC Text Processing Utility Program Development5.1 Creating DECTPU Programs Example 5–3 Sample DECTPU Programs ! Program 1! This program consists of a single DECTPU built-in procedure. SHOW (KEYWORDS); ! Program 2! This program consists of an assignment statement that! gives a value to the variable ...
DEC Text Processing Utility Program Development 5.2 Programming in DECwindows DECTPU • Menu_bar • Popup_attached_db • Popup_dialog_box • Popup_menu • Pulldown_entry • Pulldown_menu • Push_button • Scroll_bar (vertical and horizontal) • Separator • Simple_text • Toggle_button 5.2.2 Input Focus Suppor...
DEC Text Processing Utility Program Development5.2 Programming in DECwindows DECTPU 5.2.3 Global Selection Support Global selection in DECwindows is a means of preserving information selectedby you so your selection, or data about your selection, can pass betweenDECwindows applications. Each DECwind...
DEC Text Processing Utility Program Development 5.2 Programming in DECwindows DECTPU 5.2.3.4 Response to Requests for Information About the Global Selection DECTPU provides a three-level hierarchy for responding to requests from anotherapplication for information about the current selection. Applica...
DEC Text Processing Utility Program Development5.2 Programming in DECwindows DECTPU 5.2.4.1 Background on DECwindows Callbacks A callback is a mechanism used by a DECwindows widget to notify anapplication that the widget has been modified in some way. DECwindowsapplications have one or more callback...
DEC Text Processing Utility Program Development 5.2 Programming in DECwindows DECTPU 5.2.4.4 Internally Defined DECTPU Callback Routines with Widgets Not Defined by UIL Although the SET (WIDGET) built-in procedure lets you specify values forvarious resources of a widget, there are restrictions on sp...
DEC Text Processing Utility Program Development5.2 Programming in DECwindows DECTPU 5.2.5 Using Closures With DECwindows, you can specify a closure value for a widget. (DECwindowsdocumentation refers to closures as tags.) DECwindows does not define what aclosure value is; a closure is simply a value...
DEC Text Processing Utility Program Development 5.2 Programming in DECwindows DECTPU DECTPU converts the value you specify into the data type appropriate for thewidget resource you are setting. Table 5–1 shows the relationship betweenDECTPU data types for widget resources and DECwindows data types f...
DEC Text Processing Utility Program Development5.2 Programming in DECwindows DECTPU Setting Resources When you use the SET (WIDGET) built-in procedure to pass a list to a widget,you must specify both the list name and the list count resource in the same arrayindex, separated by a line feed (ASCII (1...
DEC Text Processing Utility Program Development 5.3 Writing Code Compatible with DECwindows EVE 5.3 Writing Code Compatible with DECwindows EVE This section provides information useful for programmers who extendDECwindows EVE or layer applications on DECwindows EVE. 5.3.1 Select Ranges in DECwindows...
DEC Text Processing Utility Program Development5.3 Writing Code Compatible with DECwindows EVE • Use the MB1 mouse button with the Shift key to extend a selection EVE implements a static selection by creating a range upon which you canperform EVE commands such as STORE TEXT or REMOVE. However, EVE d...
DEC Text Processing Utility Program Development 5.4 Compiling DECTPU Programs To see DECTPU messages while in EVE, use the BUFFER MESSAGEScommand. To return to the original buffer or another buffer of your choice,use the BUFFER name_of_buffer command. There are two ways to compile a program in DECTP...
DEC Text Processing Utility Program Development5.5 Executing DECTPU Programs After using the TPU command, suppose you used the following statement tocreate a program called new_program: TPU Statement: new_program := COMPILE (CURRENT_BUFFER); You could then execute new_program by using the following ...
DEC Text Processing Utility Program Development 5.5 Executing DECTPU Programs Buffer-change journaling works properly with Ctrl/C. Therefore, if you arenot using keystroke journaling, exiting from the editor is not necessary. For more information on the effects of pressing Ctrl/C, see Section 4.9.4....
DEC Text Processing Utility Program Development5.6 Using DECTPU Startup Files 5.6.3 Initialization Files An initialization file contains commands to be executed by an application layeredon DECTPU. To specify an initialization file to be executed, use the appropriatecommand syntax, as explained in th...
DEC Text Processing Utility Program Development 5.6 Using DECTPU Startup Files 5.6.5 Using Section Files A section file is the binary form of a program that implements a DECTPU-basededitor or application. It is a collection of compiled DECTPU procedure definitions,variable definitions, and key bindi...
DEC Text Processing Utility Program Development5.6 Using DECTPU Startup Files This command causes DECTPU to write the binary form of the file MY_APPLICATION.TPU to the file you specified as the parameter to the SAVEstatement in your program. To use the section file, invoke DECTPU, specifyingyour sec...
DEC Text Processing Utility Program Development 5.6 Using DECTPU Startup Files For example, to add a program called MY_CUSTOMIZATIONS.TPU to the EVEsection file, you would enter the following: $ EDIT/TPU/SECTION=EVE$SECTION/COMMAND=my_customizations.tpu This command causes DECTPU to load the EVE sec...
DEC Text Processing Utility Program Development5.6 Using DECTPU Startup Files Example 5–5 Source Code for Minimal Interface to DECTPU ! MINI.TPU - minimal DECTPU interface PROCEDURE tpu$init_procedure ! Create a buffer and window for messages message_buffer := CREATE_BUFFER ("Message Buffer"...
DEC Text Processing Utility Program Development 5.6 Using DECTPU Startup Files Whenever you want to add new procedures, variables, learn sequences, or keydefinitions to a section file, edit the command file to include the new items, andthen recompile the command file to produce a section file with t...
DEC Text Processing Utility Program Development5.6 Using DECTPU Startup Files In EVE, the code that implements the initialization sequence callsTPU$LOCAL_INIT before executing your command or initialization files. EVEdefines this procedure but leaves it empty. The user can use this procedurein a com...
DEC Text Processing Utility Program Development 5.6 Using DECTPU Startup Files If you name your command file TPU$COMMAND.TPU and it is in yourdefault directory, DECTPU reads the file by default, without your having touse the /COMMAND qualifier. If you name your file something other thanTPU$COMMAND.T...
DEC Text Processing Utility Program Development5.6 Using DECTPU Startup Files • Set formats for individual buffers EVE initialization files contain EVE commands that are executed either whenyou invoke the editor or when you issue the EVE @ (at sign) command. To create an EVE initialization file, put...
DEC Text Processing Utility Program Development 5.6 Using DECTPU Startup Files 5.6.7.2 Using an EVE Initialization File During an Editing Session To execute an EVE initialization file during an editing session, use the @ (at sign)command and specify the file. For example, the following command execu...
DEC Text Processing Utility Program Development5.7 Debugging DECTPU Programs 5.7 Debugging DECTPU Programs This section discusses the options you have for debugging DECTPU programs. To debug DECTPU programs, you can do one of the following: • Write your own debugger in the DECTPU language. This is d...
DEC Text Processing Utility Program Development 5.7 Debugging DECTPU Programs After setting breakpoints, use the GO command to switch control of executionfrom the debugger to DECTPU. After you have used this command, the screendisplays the code you specified. 5.7.2.2 Debugging Command Files To invok...
DEC Text Processing Utility Program Development5.7 Debugging DECTPU Programs To compile all code in the buffer, use the EXTEND ALL command or use theCOMPILE (CURRENT_BUFFER) statement. To execute a procedure aftercompilation, use the TPU command. For example, if you want to execute thecompiled proce...
A Sample DECTPU Procedures The following DECTPU procedures are samples of how to use DECTPU toperform certain tasks. These procedures show one way of using DECTPU; theremay be other, more efficient ways to perform the same task. Make changes tothese procedures to accommodate your style of editing. F...
Sample DECTPU ProceduresA.1 Line-Mode Editor Example A–1 (Cont.) Line-Mode Editing !Top of buffer command ["T"]: POSITION (BEGINNING_OF (CURRENT_BUFFER));MESSAGE (CURRENT_LINE); !Next line command ["N"]: MOVE_HORIZONTAL (-CURRENT_OFFSET);MOVE_VERTICAL (1);MESSAGE (CURRENT_LINE); !Ins...
Sample DECTPU Procedures A.2 Translation of Control Characters Example A–2 (Cont.) Procedure to Display Control Characters translate_array := CREATE_ARRAY (32, 0);translate_array {1} := ’<SOH>’;translate_array {2} := ’<STX>’;translate_array {3} := ’<ETX>’;translate_array {4} := ’&l...
Sample DECTPU ProceduresA.2 Translation of Control Characters Example A–2 (Cont.) Procedure to Display Control Characters !! This procedure controls the outer loop search for the special! control characters that we want to view.!PROCEDURE view_controls (source_buffer) CONSTANT Ctrl_char_str := ASCII...
Sample DECTPU Procedures A.2 Translation of Control Characters Example A–2 (Cont.) Procedure to Display Control Characters LOOP Ctrl_char_range := SEARCH_QUIETLY (Ctrl_char_pattern, FORWARD);EXITIF Ctrl_char_range = 0;POSITION (Ctrl_char_range);!! If we did not translate the character, move past it!...
Sample DECTPU ProceduresA.3 Restoring Terminal Width Before Exiting from DECTPU A.3 Restoring Terminal Width Before Exiting from DECTPU Example A–3 compares the current width of the screen with the original width.If the current width differs from the original width, the procedure restores eachwindow...
Sample DECTPU Procedures A.4 Running DECTPU from an OpenVMS Subprocess A.4 Running DECTPU from an OpenVMS Subprocess Example A–4 shows one way of running DECTPU from a subprocess. It alsoshows how to move to or from the subprocess. Example A–4 Procedure to Run DECTPU from a Subprocess !!DCL command ...
B DECTPU Terminal Support This appendix lists the terminals that support screen-oriented editing anddescribes how differences among these terminals affect the way DECTPUperforms. This appendix also describes how you can run DECTPU on terminalsthat do not support screen-oriented editing. Finally, thi...
DECTPU Terminal SupportB.1 Using Screen-Oriented Editing on Supported Terminals 132-Column Mode Only terminals that set the DEC_CRT mode bit and the advanced video modebit can alter their physical width from 80 columns to 132 and back. All otherterminals keep the physical width that is set when you ...
DECTPU Terminal Support B.1 Using Screen-Oriented Editing on Supported Terminals B.1.2 SET TERMINAL Command When you use the SET TERMINAL command to specify characteristics for yourterminal, make sure to set only those characteristics that are supported byyour terminal. If you set characteristics th...
DECTPU Terminal SupportB.3 Using Terminal Wrap Example B–1 DCL Command Procedure for SET TERM/NOWRAP $ SET TERM/NOWRAP$ ASSIGN/USER SYS$COMMAND SYS$INPUT$ EDIT/TPU/SECTION = EDTSECINI$ SET TERM/WRAP B–4 DECTPU Terminal Support
C DECTPU Debugger Commands You can use the following commands for debugging once you have set breakpoints,compiled code, and started execution. ATTACH process Suspends the current editing session and transfers control to another activeprocess or subprocess. DCL process names are case sensitive. CANC...
DECTPU Debugger Commands SET WINDOW top, length Places the top of the debugger window at the line number specified by the topparameter. Extends the window down by the number of lines specified by thelength parameter. The default length is 7 lines. The minimum valid length is 3lines. The SET WINDOW c...
Index A @ command, 5–27Abort resulting from exceeding virtual address space, 2–8 ABORT statement, 4–24, 4–29 to 4–30Active editing point, 3–4Algorithm for naming buffer-change journal file, 2–8 Alternation pattern ( | ), 3–14 AND operator, 4–8Arithmetic expression, 4–10ARRAY data type, 3–2 to 3–3Ass...
/CREATE qualifier, 2–11CREATE_WIDGET built-in procedure using to specify callback routine, 5–8using to specify resource values, 5–11 CREATE_WINDOW built-in procedure, 3–23Ctrl/C, 5–16 with case-style error handler, 4–26, 4–27with procedural error handler, 4–24, 4–25 Current buffer active editing poi...
ENDIF statement, 4–20 to 4–21ENDLOOP statement, 4–20ENDMODULE statement, 4–14ENDON_ERROR statement, 4–23 to 4–28ENDPROCEDURE statement, 4–15 to 4–19Entering control characters, 4–3EQUIVALENCE statement, 4–30Error resulting from exceeding virtual address space, 2–8 Error handler case-style, 4–25 to 4...
Journaling (cont’d) layered application control, 2–6using both keystroke and buffer-change journaling, 2–7 "journaling" string constant parameter GET_INFO built-in, 2–6, 2–14 /JOURNAL qualifier, 2–6, 2–14"journal_file" string constant parameter GET_INFO built-in, 2–7, 2–14 JOURNAL_OP...
Pattern (cont’d) execution, 3–16expression, 4–11linking (&), 3–13operators, 3–13searching, 3–10 Pattern assignment partial (@), 3–14 PATTERN data type, 3–10 to 3–17Predefined constants names, 4–12 Procedural error handler, 4–24 to 4–25Procedure executing, 5–16name, 4–15parameter, 4–15 to 4–17rec...
Showing version number, 5–2SHOW_BUFFER variable, 5–24Source files for EVE, 2–3Startup files, 2–2 to 2–3, 5–17 to 5–27 command file, 2–2definition, 2–2initialization file, 2–2order of execution, 5–18section file, 2–2 /START_POSITION qualifier, 2–20Statement separator for, 5–3 Static selection, 5–13St...
W Widget listing of, 5–4 WIDGET data type, 3–22Widget resources data types of, 5–10 to 5–11specifying, 5–10 Window creating, 3–23current, 3–24definition, 3–22dimensions, 3–23 getting information, 3–25length, 3–23mapping, 3–24removing, 3–25unmapping, 3–25unsupported terminals, 3–26updating, 3–25value...
Compaq Manuals
-
Compaq SDLT 220GB
Manual
-
Compaq 60002MC10
Manual
-
Compaq 3500
Manual
-
Compaq DL580
Manual
-
Compaq PM-1
Manual
- Compaq Presario V2600 Notebook PC Manual
-
Compaq 420C 486 DX4/75 MHZ 420 MB 8 MB 10.4
Manual
-
Compaq SR1109UK
Manual
-
Compaq 326817-003
Manual
-
Compaq 212953-B21
Manual
-
Compaq MS500
Manual
-
Compaq 1000 LX
Manual
-
Compaq M700
Manual
-
Compaq 281862-002
Manual
-
Compaq H3100
Manual
- Compaq 4103TH Manual
-
Compaq JP2
Manual
-
Compaq 320
Manual
-
Compaq 300
Manual
-
Compaq AP230
Manual