Compaq DEC Text Processing Utility (DECTPU) Guide Manual
Compaq DEC Text Processing Utility (DECTPU) Guide Manual

Compaq DEC Text Processing Utility (DECTPU) Guide Manual

Guide to the dec text processing utility
Table of Contents

Advertisement

Quick Links

Guide to the DEC Text
Processing Utility
Order Number: AA–PWCBD–TE
April 2001
This manual introduces the DEC Text Processing Utility (DECTPU). It
is for experienced programmers as well as new users of DECTPU.
Revision/Update Information:
Software Version:
Compaq Computer Corporation
Houston, Texas
This manual supersedes the Guide
to the DEC Text Processing Utility,
Version 3.1
OpenVMS Alpha Version 7.3
OpenVMS VAX Version 7.3
The content of this manual has not
changed sinced OpenVMS Version 7.1

Advertisement

Table of Contents
loading

Summary of Contents for Compaq DEC Text Processing Utility (DECTPU) Guide

  • Page 1 This manual supersedes the Guide Revision/Update Information: to the DEC Text Processing Utility, Version 3.1 OpenVMS Alpha Version 7.3 Software Version: OpenVMS VAX Version 7.3 The content of this manual has not changed sinced OpenVMS Version 7.1 Compaq Computer Corporation Houston, Texas...
  • Page 2 © 2001 Compaq Computer Corporation Compaq, VAX, VMS and the Compaq logo Registered in U.S. Patent and Trademark Office. OpenVMS is a trademark of Compaq Information Technologies Group, L.P. in the United States and other countries. PostScript is a registered trademark of Adobe Systems Incorporated.
  • Page 3: Table Of Contents

    Contents Preface ............1 Overview of the DEC Text Processing Utility Description of DECTPU .
  • Page 4 2.6.8 /JOURNAL ..........2–14 2.6.9 /MODIFY .
  • Page 5 Identifiers ..........4–5 Variables .
  • Page 6 5.2.3 Global Selection Support ........5–6 5.2.3.1 Difference Between Global Selection and Clipboard .
  • Page 7 A Sample DECTPU Procedures Line-Mode Editor ..........A–1 Translation of Control Characters .
  • Page 8 A–1 Line-Mode Editing ........A–1 Procedure to Display Control Characters .
  • Page 9: Preface

    Appendix C lists commands for debugging DECTPU. Related Documents For additional information about OpenVMS products and services, access the following World Wide Web address: http://www.openvms.compaq.com/ Reader’s Comments Compaq welcomes your comments on this manual. Please send comments to either of the following addresses: Internet openvmsdoc@compaq.com...
  • Page 10 Mail Compaq Computer Corporation OSSG Documentation Group, ZKO3-4/U08 110 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 best meets your needs, call 800-282-6672.
  • Page 11 bold text This text style represents the introduction of a new term or the name of an argument, an attribute, or a reason. italic text Italic text indicates important information, complete titles of manuals, or variables. Variables include information that varies in system output (Internal error number), in command lines (/PRODUCER=name), and in command parameters in text (where dd represents the predefined code for the device...
  • Page 13: Overview Of The Dec Text Processing Utility

    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) •...
  • Page 14: Dectpu And User Applications

    Bit-mapped workstations running the DECwindows software 1.2 Description of DECwindows DECTPU DECTPU supports the Compaq DECwindows Motif for OpenVMS user interface. The variant of DECTPU that supports window-oriented user interfaces is known as DECwindows DECTPU. The windows referred to as DECwindows are not the same as DECTPU windows.
  • Page 15: Decwindows Dectpu And Decwindows Features

    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 contain routines for creating and manipulating DECwindows interfaces. DECwindows DECTPU contains a number of built-in procedures that provide access to the routines in the DECwindows libraries and toolkits.
  • Page 16: Decwindows Dectpu And The Decwindows User Interface Language

    Overview of the DEC Text Processing Utility 1.2 Description of DECwindows DECTPU The DECwindows version of DECTPU does not provide access to all of the features of DECwindows. For example, there are no DECTPU built-in procedures to handle floating-point numbers or to manipulate entities such as lines, curves, and fonts.
  • Page 17: Dectpu Language

    Overview of the DEC Text Processing Utility 1.3 Description of EVE Figure 1–2 DECTPU as a Base for User-Written Interfaces User−Written Extensions to EVE User−Written Application Editor ZK−6544−GE You can implement extensions to EVE with any of the following: • A DECTPU command file (DECTPU source code) •...
  • Page 18: Data Types

    Overview of the DEC Text Processing Utility 1.4 DECTPU Language 1.4.1 Data Types The DECTPU language has an extensive set of data types. You use data types to interpret the meaning of the contents of a variable. Unlike many languages, the DECTPU language has no declarative statement to enforce which data type must be assigned to a variable.
  • Page 19: Sample User-Written Procedure

    1.5 Terminals Supported by DECTPU DECTPU runs on all VAX and Alpha computers, and supports screen-oriented editing on the Compaq VT400-, VT300-, VT200-, and VT100-series terminals, as well as on other video display terminals that respond to ANSI control functions.
  • Page 20: Learning Path For Dectpu

    Overview of the DEC Text Processing Utility 1.6 Learning Path for DECTPU 1.6 Learning Path for DECTPU The suggested path for learning to use DECTPU is to first read the documentation describing EVE if you are not familiar with that editor. The DECTPU/EVE documentation contains both reference and tutorial material for new EVE users.
  • Page 21: Getting Started With Dectpu

    file: $ EDIT/TPU text_file.lis This command opens TEXT_FILE.LIS for editing. If you are using the EVE editor, Compaq suggests that you create a symbol like the following one to simplify invoking EVE: $ EVE == "EDIT/TPU"...
  • Page 22: Default File Specifications

    Getting Started with DECTPU 2.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.TPU$SECTION Command TPU$COMMAND.TPU...
  • Page 23: Invoking Dectpu From A Dcl Command Procedure

    Getting Started with DECTPU 2.1 Invoking DECTPU on OpenVMS Systems Note When you invoke DECTPU with the /NOSECTION qualifier, DECTPU does not use any binary file to provide an interface. Even the Return and Delete keys are not defined. Use /NOSECTION when you are running a standalone command file or when you are creating a new section file and do not want the procedures, variables, and definitions from an existing section file to be included.
  • Page 24: Dcl Command Procedure Filename.com

    Getting Started with DECTPU 2.2 Invoking DECTPU from a DCL Command Procedure Example 2–1 shows a DCL command procedure that ‘‘remembers’’ the last file that you were editing and uses it as the input file for DECTPU. When you edit a file, the file name you specify is saved in the DCL symbol last_file_edited.
  • Page 25: Dcl Command Procedure Invisible_Tpu.com

    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. $ EDIT/TPU/NOSECTION/COMMAND=gsr.tpu/NODISPLAY ’p1’...
  • Page 26: Invoking Dectpu From A Batch Job

    Getting Started with DECTPU 2.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 can use 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 Example 2–4) to make edits in batch mode to a file called MY_FILE.TXT, enter the following command:...
  • Page 27: Keystroke Journaling

    For more information on using a keystroke journal file for recovery, see Section 2.6.8 and the Extensible Versatile Editor Reference Manual. Note Compaq strongly recommends the use of buffer-change journaling rather than keystroke journaling. To reconstruct your work, use the /JOURNAL and /RECOVER qualifiers. The following example shows system recovery on a file called JACKI.SDML:...
  • Page 28: Buffer-Change Journal File-Naming Algorithm

    If the work file is full, DECTPU attempts to return either a TPU$_GETMEM or TPU$_NOCACHE error message. Although you may be able to free up some space by deleting unused buffers, Compaq recommends that you terminate the DECTPU session if you encounter either of these errors. You can then start a new session with fewer or smaller buffers.
  • Page 29: Using Openvms Edit/Tpu Command Qualifiers

    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 pool is fixed.
  • Page 30: Command

    Getting Started with DECTPU 2.6 Using OpenVMS EDIT/TPU Command Qualifiers The choice of character set also affects how your text appears when printed. For the text displayed in DECTPU to look the same when printed, you must choose the same character set for both DECTPU and the printer. There are two ways to specify the character set you want to use: •...
  • Page 31: Create

    Getting Started with DECTPU 2.6 Using OpenVMS EDIT/TPU Command Qualifiers By default, DECTPU tries to read a command file called TPU$COMMAND.TPU in your default directory. You can use a full file specification after the /COMMAND qualifier or define the logical name TPU$COMMAND to point to a command file other than the default.
  • Page 32: Debug

    Getting Started with DECTPU 2.6 Using OpenVMS EDIT/TPU Command Qualifiers By default, EVE creates a new file if the specified input file does not exist. If you use /NOCREATE and specify an input file that does not exist, EVE aborts the editing session and returns you to the DCL command level.
  • Page 33: Initialization

    DECTPU specifies /INITIALIZATION but does not supply a default file specification. The default file specification for /INITIALIZATION is set by the application. Compaq recommends that a user-written application define the default file specification of an initialization file by using the following format: facility$init.facility...
  • Page 34: Interface

    Getting Started with DECTPU 2.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 following command: $ EDIT/TPU /INTERFACE=DECWINDOWS Then, if DECwindows is available, DECTPU displays the editing session in a...
  • Page 35: Modify

    Utility Reference Manual. For more information on how to recover from an interrupted EVE editing session, see the Extensible Versatile Editor Reference Manual. Note Compaq strongly recommends the use of buffer-change journaling rather than keystroke journaling. 2.6.9 /MODIFY /MODIFY (default) /NOMODIFY The /MODIFY qualifier determines whether the first user buffer in an editing...
  • Page 36: Output

    Getting Started with DECTPU 2.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. Regardless of what qualifiers you use on the DCL command line, EVE makes all user buffers after the first buffer modifiable.
  • Page 37: Read_Only

    Getting Started with DECTPU 2.6 Using OpenVMS EDIT/TPU Command Qualifiers Using /NOOUTPUT, you can develop an application that lets you control the output 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_WRITE attribute for the main buffer and suppress creation of an output file for that buffer.
  • Page 38: Recover

    Getting Started with DECTPU 2.6 Using OpenVMS EDIT/TPU Command Qualifiers 2.6.12 /RECOVER /RECOVER /NORECOVER (default) The /RECOVER qualifier determines whether DECTPU reads a keystroke journal file at the start of an editing session to recover edits made during a prior interrupted editing session. For example, the following command causes DECTPU to recover the edits made in a previous EVE editing session on the file NOTES.TXT: $ EDIT/TPU/RECOVER notes.txt...
  • Page 39: Section

    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 a keystroke journal file or a single buffer from a buffer-change journal file. If you specify /JOURNAL=filename, EVE recovers from the specified keystroke journal file.
  • Page 40: Start_Position

    Getting Started with DECTPU 2.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 no user interface and no keys are defined. In this state, the only way to exit from DECTPU is to press Ctrl/Y.
  • Page 41: Dec Text Processing Utility Data Types

    DEC Text Processing Utility Data Types A data type is a group of elements that ‘‘belong together’’; the elements are all formed in the same way and are treated consistently. The data type of a variable determines the operations that can be performed on it. The DECTPU data types are represented by the following keywords: •...
  • Page 42: Array Data Type

    DEC Text Processing Utility Data Types 3.1 Array Data Type 3.1 Array Data Type An array is a structure for storing and manipulating a group of elements. These elements can be of any data type. You create arrays with the CREATE_ARRAY built-in procedure.
  • Page 43: Buffer Data Type

    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 not yet been created, then that element is dynamically created and both the index and the value are stored.
  • Page 44: Integer Data Type

    DEC Text Processing Utility Data Types 3.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 you are developing an application layered on DECTPU.
  • Page 45: Keyword Data Type

    DEC Text Processing Utility Data Types 3.3 Integer Data Type DECTPU also supports binary, octal, and hexadecimal integers. Binary integers are 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;...
  • Page 46: Keywords Used For Key Names

    DEC Text Processing Utility Data Types 3.4 Keyword Data Type Table 3–1 shows the correspondence between keywords used as DECTPU key names and the keys on the VT400, VT300, VT200, and VT100 series of keyboards. You do not have to define a key or control sequence just because there is a DECTPU keyword for the key or sequence.
  • Page 47: Learn Data Type

    DECTPU Key Name Series Key VT100 Key Ctrl_Z_KEY Ctrl/Z Ctrl/Z The OpenVMS terminal driver handles the following keys as special cases. Compaq recommends that you avoid defining the following control characters and function key: • Ctrl/C • Ctrl/O • Ctrl/Q •...
  • Page 48: Marker Data Type

    DEC Text Processing Utility Data Types 3.5 Learn Data Type To enable your user-written DECTPU procedures to work successfully with learn sequences, you must observe the following coding rules when you write procedures that you or someone else can bind to a key: •...
  • Page 49 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 editing point at the time you create the marker. A bound marker is tied to the character on which it is created.
  • Page 50: Pattern Data Type

    DEC Text Processing Utility Data Types 3.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. The example assumes that the editing point is free. The code in this example assigns the string representation of the current line to the variable bat without adding padding blanks to the buffer.
  • Page 51 DEC Text Processing Utility Data Types 3.7 Pattern Data Type To create a pattern, use DECTPU pattern operators (+, &, | , @) to connect any of the following: • String constants • String variables • Pattern variables • Calls to pattern built-in procedures •...
  • Page 52: Using Pattern Built-In Procedures And Keywords

    DEC Text Processing Utility Data Types 3.7 Pattern Data Type for the pattern, the built-in returns a range that contains the text that matches the pattern. You can assign the range to a variable. The following example uses strings and pattern operators to create a pattern that is stored in the variable my_pat.
  • Page 53: Using Pattern Operators

    If SEARCH or SEARCH_QUIETLY finds such a line, the built-in returns a range that contains the text abc and the end of the line. Compaq recommends that you use the concatenation operator rather than the link operator unless you specifically require the link operator.
  • Page 54: Pattern Alternation Operator)

    DEC Text Processing Utility Data Types 3.7 Pattern Data Type Given this sequence of definitions, a search for pat_var succeeds if DECTPU encounters the following string: a5xcd Because two pattern variables are linked, DECTPU searches first for the text that matches p1, then unanchors the search, and then searches for the text that matches p2.
  • Page 55: Relational Operators

    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 the text de. If you assign to a variable a partial pattern that matches a position, rather than a character, the partial pattern variable is a range that contains the character or line-end at the point in the file where the partial pattern was matched.
  • Page 56: Compiling And Executing Patterns

    DEC Text Processing Utility Data Types 3.7 Pattern Data Type Given this definition, the following patterns match the same text but are not equal: pat1 := LINE_BEGIN + ANY ("abc"); pat2 := LINE_BEGIN + this_pat; 3.7.4 Compiling and Executing Patterns When you execute a DECTPU statement that contains a pattern expression, DECTPU builds an internal representation of the pattern.
  • Page 57: Anchoring A Pattern

    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 the anchored part of the pattern to text starting at the current search position. If the anchored part of a pattern fails to match that text, SEARCH or SEARCH_ QUIETLY stops searching.
  • Page 58: Process Data Type

    DEC Text Processing Utility Data Types 3.8 Process Data Type 3.8 Process Data Type The CREATE_PROCESS built-in procedure returns a value of the process data type. A DECTPU process runs as a subprocess. DECTPU processes have the same restrictions that OpenVMS subprocesses have. Following are some of the restrictions: •...
  • Page 59: Range Data Type

    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 can form a range with the CREATE_RANGE built-in procedure. A range is associated with characters within a buffer. If the characters within a range move, the range moves with them.
  • Page 60: String Data Type

    DEC Text Processing Utility Data Types 3.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, REVERSE, and UNDERLINE.
  • Page 61: Unspecified Data Type

    DEC Text Processing Utility Data Types 3.11 String Data Type The maximum length for a string is 65,535 characters. A restriction of the DECTPU compiler is that a string constant (an open quotation mark, some characters, and a close quotation mark) must have both its opening and closing quotation marks on the same line.
  • Page 62: Widget Data Type

    DEC Text Processing Utility Data Types 3.12 Unspecified Data Type To give a variable the data type unspecified, assign the predefined constant TPU$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 support DECwindows widgets.
  • Page 63: Defining Window Dimensions

    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 full width of the screen or terminal emulator. In DECTPU, you can set the window width to be narrower than the width of the screen or terminal emulator.
  • Page 64: Displaying Window Values

    DEC Text Processing Utility Data Types 3.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 in original_top and original_bottom. When you map a window to the screen with the MAP built-in procedure, the window becomes visible on the screen.
  • Page 65: Removing Windows

    DEC Text Processing Utility Data Types 3.14 Window Data Type For more information on the cursor position in a window and the POSITION built-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 built-in procedure or the DELETE built-in procedure.
  • Page 66: Terminals That Do Not Support Windows

    DEC Text Processing Utility Data Types 3.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, you must use the /NODISPLAY qualifier when you invoke DECTPU.
  • Page 67: Lexical Elements Of The Dec Text Processing Utility Language

    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 of characters, such as an identifier. The basic unit of a lexical element is a character from either the DEC Multinational Character Set or the ISO_LATIN1 Character Set.
  • Page 68: Character Sets

    Lexical Elements of the DEC Text Processing Utility Language 4.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 DECTPU to use: •...
  • Page 69: Iso Latin1 Character Set (Iso_Latin1)

    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 control characters and Latin1 supplemental multinational characters. Table 4–3 shows the groups into which you can categorize characters.
  • Page 70: Dectpu Symbols

    Comma Separates parameters Exclamation point Begins comment Dollar sign Indicates a variable, constant, keyword, or procedure name that is reserved to Compaq Right brace Closes array element index expression Equal sign Relational operator Greater than sign >...
  • Page 71: Identifiers

    Following is an example of a variable assignment: new_buffer := CREATE_BUFFER ("new_buffer_name"); Compaq suggests that you establish some convention for naming variables so that you can distinguish your variables from the variables in the section file that you are using.
  • Page 72: Constants

    Lexical Elements of the DEC Text Processing Utility Language 4.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 been assigned a value outside the procedure user_tab. The local variable this_mode has the value established in the procedure user_tab only when this procedure is executing.
  • Page 73: Operators

    Lexical Elements of the DEC Text Processing Utility Language 4.6 Constants Example 4–2 (Cont.) Global and Local Constant Declarations PROCEDURE user_hello_world CONSTANT world := "world"; MESSAGE (user_hello + " " + world); ! Display "Hello world" ! in message area ENDPROCEDURE;...
  • Page 74: Expressions

    Lexical Elements of the DEC Text Processing Utility Language 4.7 Operators Table 4–5 (Cont.) DECTPU Operators Type Symbol Description Pattern concatenation & Pattern linkage Logical Boolean AND Boolean NOT Boolean OR Boolean exclusive OR You can use the + operator to concatenate strings. You can also use the relational operators to compare a string with a string, a marker with a marker, or a range with a range.
  • Page 75 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 type conversions to allow for the mixing of data types within an expression.
  • Page 76: Arithmetic Expressions

    Lexical Elements of the DEC Text Processing Utility Language 4.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 operators (+, –, *, / ) with integer data types to form arithmetic expressions.
  • Page 77: Pattern Expressions

    Lexical Elements of the DEC Text Processing Utility Language 4.8 Expressions When used with markers, these operators test whether one marker is closer to (or farther from) the top of the buffer than another marker. (If markers are in different buffers, they will return as false.) For example, the procedure in Example 4–3 uses relational operators to determine which half of the buffer the cursor is located in.
  • Page 78: Reserved Words

    Lexical Elements of the DEC Text Processing Utility Language 4.8 Expressions A true value in DECTPU is any odd integer; a false value is any even integer. Use the logical operators (AND, NOT, OR, XOR) to combine one or more expressions. DECTPU evaluates Boolean expressions enclosed in parentheses before other elements.
  • Page 79: Declarations And Statements

    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 Declarations and Statements A DECTPU program can consist of a sequence of declarations and statements. These declarations and statements control the action performed in a procedure or a program.
  • Page 80: Module Declaration

    Lexical Elements of the DEC Text Processing Utility Language 4.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 future expansion of the DECTPU language.
  • Page 81: Procedure Declaration

    4.9.4.3 Procedure Names A procedure name can be any valid identifier that is not a DECTPU reserved word. Compaq suggests that you use a convention when naming your procedures. For instance, you might prefix procedure names with your initials. In this way, you can easily distinguish procedures that you write from other procedures such as the DECTPU built-in procedures.
  • Page 82: Simple Procedure With Parameters

    Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words The scope of procedure parameters is limited to the procedure in which they are defined. The maximum number of parameters in a parameter list is 127. A procedure can declare its parameters as required or optional. Required parameters and optional parameters are separated by a semicolon.
  • Page 83: Complex Procedure With Optional Parameters

    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, ! Informational severity code user_fatal...
  • Page 84: Procedures That Return A Result

    Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words 4.9.4.5 Procedures That Return a Result Procedures that return a result are called function procedures. Example 4–6 shows a procedure that returns a true ( 1 ) or false ( 0 ) value. Note All DECTPU procedures return a result.
  • Page 85: Local Variables

    Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words Example 4–8 Recursive Procedure PROCEDURE user_reverse LOCAL temp_string; temp_string := READ_LINE("input>"); ! Read a response IF temp_string <> " " ! Quit if nothing entered ! but the RETURN key. THEN user_reverse ! Call user_reverse recursively...
  • Page 86: Assignment Statement

    Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words 4.9.4.10 Assignment Statement The assignment statement assigns a value to a variable. In so doing, it associates the variable with the appropriate data type. Syntax identifier := expression; The assignment operator is a combination of two characters: a colon and an equal sign (:=).
  • Page 87: Case Statement

    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_ . . . alternate-statement_n;]] ENDIF; You can use any DECTPU language statements except ON_ERROR statements in a THEN or ELSE clause.
  • Page 88: Procedure That Uses The Case Statement

    Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words Syntax CASE case-selector [ [FROM lower-constant-expr, TO upper-constant-expr] ] [constant-expr_1 [ [,...] ]] : statement [ [,...] ]; [constant-expr_2 [ [,...] ]] : statement [ [,...] ]; [constant-expr_n [ [,...] ]] : statement [ [,...] ]; [ [[INRANGE] : statement [ [,...] ] ;] ] [ [[OUTRANGE] : statement [ [,...] ] ;] ] ENDCASE;...
  • Page 89: Error Handling

    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_ERROR defines the actions that are to be taken when a procedure fails to execute successfully.
  • Page 90: Procedural Error Handlers

    Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words • RETURN—This language statement stops the execution of the procedure in which 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 executing the program from the point at which the error occurred.
  • Page 91: Case-Style Error Handlers

    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 is set 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 to a warning or error message that is placed in the message buffer.
  • Page 92: Procedure With A Case-Style Error Handler

    Lexical Elements of the DEC Text Processing Utility Language 4.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_ABORT THEN eve$message (EVE$_LEARNABORT); RETURN (TRUE); ELSE RETURN (FALSE); ENDIF; ENDPROCEDURE;...
  • Page 93 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 message buffer unless the error handler code instructs it to do so. In this case, after setting ERROR, ERROR_LINE, and ERROR_TEXT, DECTPU executes the code associated with the selector.
  • Page 94: Ctrl/C Handling

    Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words • If the error is not due to you pressing Ctrl/C, the error message is written to the message buffer and DECTPU performs the equivalent of the following sequence: special_error_symbol := 0;...
  • Page 95: Abort Statement

    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_ERROR ! Suppress warning message...
  • Page 96: Miscellaneous Declarations

    Lexical Elements of the DEC Text Processing Utility Language 4.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: • EQUIVALENCE • LOCAL •...
  • Page 97 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 are accessible only within that unbound code. Unbound code can occur in the following places: •...
  • Page 98: Lexical Keywords

    Lexical Elements of the DEC Text Processing Utility Language 4.9 Reserved Words If this code is included in TEMP.TPU, the following command demonstrates the scope of the various local variables: EDIT/TPU/NOSECTION/NOINITIALIZE/NODISPLAY/COMMAND=temp.tpu Starting or ending the unbound, non-init code Starting or ending the module init code Within procedure bat, within module mmm Starting or ending the module init code Within procedure bat, within module mmm...
  • Page 99: Conditional Compilation

    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 different conditions: • • %IFDEF • %THEN • %ELSE • %ENDIF You use conditional compilation lexical keywords in a manner similar to ordinary IF/THEN/ELSE/ENDIF statements.
  • Page 100: Specifying The Radix Of Numeric Constants

    Lexical Elements of the DEC Text Processing Utility Language 4.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. The number can consist only of the digits 0 and 1.
  • Page 101: Dec Text Processing Utility Program Development

    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 DECTPU programs. You can use DECTPU programs to perform editing tasks, to customize or extend an existing application, or to implement your own application layered on DECTPU.
  • Page 102: Simple Programs

    DEC Text Processing Utility Program Development 5.1 Creating DECTPU Programs • You can use executable statements either within procedures or outside procedures. You must place all procedure declarations before any executable statements that are not in procedures. • You can enter DECTPU statements from within EVE by using the EVE command TPU.
  • Page 103: Program Syntax

    DEC Text Processing Utility Program Development 5.1 Creating DECTPU Programs Other possible reasons for a TPU$_STACKOVER condition are that you have too many statements that are not in procedures, or that you have too many small procedures. If you have too many small procedures, you must either consolidate them or break them into separate files.
  • Page 104: Programming In Decwindows Dectpu

    DEC Text Processing Utility Program Development 5.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 video_attribute video_attribute := UNDERLINE;...
  • Page 105: Input Focus Support

    In the Motif environment, DECTPU supports both implicit and explicit focus policies. Compaq recommends that you use only a DECwindows section file with DECwindows DECTPU. (All versions of EVE shipped with OpenVMS Version 5.1 or higher are compatible with DECwindows and are suitable for building DECwindows section files, as well as DECTPU Version 3.0 or higher.) However,...
  • Page 106: Global Selection Support

    DEC Text Processing Utility Program Development 5.2 Programming in DECwindows DECTPU 5.2.3 Global Selection Support Global selection in DECwindows is a means of preserving information selected by you so your selection, or data about your selection, can pass between DECwindows applications. Each DECwindows application can own one or more global selections.
  • Page 107: Response To Requests For Information About The Global Selection

    DECTPU responds with the text of the select range as a string, with each line break represented by a line feed. Compaq recommends that you use only a DECwindows section file with DECwindows DECTPU. However, if you do not follow this recommendation, DECTPU’s automatic grabbing of the primary global selection enables your...
  • Page 108: Background On Decwindows Callbacks

    DEC Text Processing Utility Program Development 5.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 an application that the widget has been modified in some way. DECwindows applications have one or more callback routines that define what the application does in response to the callback.
  • Page 109: Internally Defined Dectpu Callback Routines With Widgets Not Defined By Uil

    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 for various resources of a widget, there are restrictions on specifying values for callback resources of widgets.
  • Page 110: Using Closures

    DEC Text Processing Utility Program Development 5.2 Programming in DECwindows DECTPU 5.2.5 Using Closures With DECwindows, you can specify a closure value for a widget. (DECwindows documentation refers to closures as tags.) DECwindows does not define what a closure value is; a closure is simply a value that DECwindows understands how to recognize and manipulate so that a DECwindows application programmer can use the value if needed in the application.
  • Page 111: Specifying A List As A Resource 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 the widget resource you are setting. Table 5–1 shows the relationship between DECTPU data types for widget resources and DECwindows data types for widget resources.
  • Page 112 DEC Text Processing Utility Program Development 5.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 array index, separated by a line feed (ASCII (10)).
  • Page 113: Writing Code Compatible With Decwindows Eve

    You can use the SELECT_RANGE built-in procedure to get the current selection if the selection is a dynamic selection. However, Compaq recommends that you use EVE$SELECTION to get the current selection because this routine returns the current selection regardless of how it was created.
  • Page 114: Relation Of Eve Selection To Decwindows Global Selection

    DEC Text Processing Utility Program Development 5.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 can perform EVE commands such as STORE TEXT or REMOVE.
  • Page 115: Compiling On The Eve Command Line

    DEC Text Processing Utility Program Development 5.4 Compiling DECTPU Programs To see DECTPU messages while in EVE, use the BUFFER MESSAGES command. 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 DECTPU: on the command line of EVE or in a DECTPU buffer.
  • Page 116: Procedure Execution

    ERASE_RANGE, MOVE_ TEXT, and FILL. DECTPU behavior after such an interruption is unpredictable. Compaq recommends that you exit from the editor after pressing Ctrl/C to ensure that you do not lose any work because of an inaccurate keystroke journal file.
  • Page 117: Using Dectpu Startup Files

    DEC Text Processing Utility Program Development 5.5 Executing DECTPU Programs Buffer-change journaling works properly with Ctrl/C. Therefore, if you are not 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.14 and Section 4.9.4.16.
  • Page 118: Initialization Files

    DEC Text Processing Utility Program Development 5.6 Using DECTPU Startup Files 5.6.3 Initialization Files An initialization file contains commands to be executed by an application layered on DECTPU. To specify an initialization file to be executed, use the appropriate command syntax, as explained in this section. DECTPU does not determine the default handling of an initialization file;...
  • Page 119: Using Section Files

    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-based editor or application. It is a collection of compiled DECTPU procedure definitions, variable definitions, and key bindings.
  • Page 120: Extending An Existing Section File

    DEC Text Processing Utility Program Development 5.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 SAVE statement in your program. To use the section file, invoke DECTPU, specifying your section file.
  • Page 121: Sample Section File

    DEC Text Processing Utility Program Development 5.6 Using DECTPU Startup Files For example, to add a program called MY_CUSTOMIZATIONS.TPU to the EVE section file, you would enter the following: $ EDIT/TPU/SECTION=EVE$SECTION/COMMAND=my_customizations.tpu This command causes DECTPU to load the EVE section file and then read, compile, and execute the command file you specify.
  • Page 122: Source Code For Minimal Interface To Dectpu

    DEC Text Processing Utility Program Development 5.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"); SET (NO_WRITE, message_buffer);...
  • Page 123: Recommended Conventions For Section Files

    DEC Text Processing Utility Program Development 5.6 Using DECTPU Startup Files Whenever you want to add new procedures, variables, learn sequences, or key definitions to a section file, edit the command file to include the new items, and then recompile the command file to produce a section file with the new items. For example, if you want to add key definitions for the arrow keys, you could edit the file MINI.TPU and add the following statements after any procedures in the file: DEFINE_KEY ("MOVE_VERTICAL (-1)", UP);...
  • Page 124: Using Command Files

    DEC Text Processing Utility Program Development 5.6 Using DECTPU Startup Files In EVE, the code that implements the initialization sequence calls TPU$LOCAL_INIT before executing your command or initialization files. EVE defines this procedure but leaves it empty. The user can use this procedure in a command file to contain DECTPU statements that implement private initializations.
  • Page 125: Using Eve Initialization Files

    (for example, key definitions to move to the next text marker). Remember to name your variables and procedures so they do not conflict with DECTPU reserved words and predefined identifiers. Compaq recommends that you prefix your variable and procedure names with three letters (your initials, for example) followed by an underscore ( _ ).
  • Page 126: Using An Eve Initialization File At Startup

    DEC Text Processing Utility Program Development 5.6 Using DECTPU Startup Files • Set formats for individual buffers EVE initialization files contain EVE commands that are executed either when you invoke the editor or when you issue the EVE @ (at sign) command. To create an EVE initialization file, put in the file the EVE commands you want to use to customize the editor.
  • Page 127: Using An Eve Initialization File During An Editing Session

    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 executes an initialization file called MYEVE.EVE in your current (default) directory.
  • Page 128: Debugging Dectpu Programs

    DEC Text Processing Utility Program Development 5.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 discussed in Section 5.7.1.
  • Page 129: Debugging Command Files

    DEC Text Processing Utility Program Development 5.7 Debugging DECTPU Programs After setting breakpoints, use the GO command to switch control of execution from the debugger to DECTPU. After you have used this command, the screen displays the code you specified. 5.7.2.2 Debugging Command Files To invoke the debugger on a command file, use the /DEBUG, /COMMAND, and /NOSECTION qualifiers.
  • Page 130: Handling Errors

    DEC Text Processing Utility Program Development 5.7 Debugging DECTPU Programs To compile all code in the buffer, use the EXTEND ALL command or use the COMPILE (CURRENT_BUFFER) statement. To execute a procedure after compilation, use the TPU command. For example, if you want to execute the compiled procedure user_fum, type the following at the EVE Command prompt: Command: TPU user_fum When DECTPU encounters a breakpoint (or when you use the STEP command...
  • Page 131: A.1 Line-Mode Editor

    Sample DECTPU Procedures The following DECTPU procedures are samples of how to use DECTPU to perform certain tasks. These procedures show one way of using DECTPU; there may be other, more efficient ways to perform the same task. Make changes to these procedures to accommodate your style of editing.
  • Page 132: A.2 Translation Of Control Characters

    Sample DECTPU Procedures A.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); !Insert text command ["I"]: SPLIT_LINE; COPY_TEXT (SUBSTR (cmd, 2, 999)); MESSAGE (CURRENT_LINE);...
  • Page 133 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} := ’<EOT>’; translate_array {5} := ’<ENQ>’; translate_array {6} := ’<ACK>’;...
  • Page 134 Sample DECTPU Procedures A.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 (0) + ASCII (1) + ASCII (2) + ASCII (3) + ASCII (4) + ASCII (5) + ASCII (6) + ASCII (7) + ASCII (8) + ASCII (9) + ASCII (10) + ASCII (11) +...
  • Page 135 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 IF NOT translate_controls (Ctrl_char_range) THEN MOVE_HORIZONTAL (1);...
  • Page 136: A.3 Restoring Terminal Width Before Exiting From Dectpu

    Sample DECTPU Procedures A.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 each window to its original width.
  • Page 137: A.4 Running Dectpu From An Openvms Subprocess

    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 also shows how to move to or from the subprocess. Example A–4 Procedure to Run DECTPU from a Subprocess !DCL command procedure to run DECTPU from subprocess !Put $ e = "@keptedit"...
  • Page 139: Terminal Behavior That Affects Dectpu's Performance

    ANSI control functions and that operate in ANSI mode. DECTPU screen-oriented editing is designed to optimize the features available with the Compaq VT400, VT300, and VT200 families of terminals and the Compaq VT100 family of terminals. DECTPU does not support screen-oriented editing on Compaq VT52-compatible terminals.
  • Page 140 (Usually you use the 2-character combination of the ESCAPE key and the left bracket ( [ ).) To take advantage of this feature, set your terminal to DEC_CRT2 mode. The Compaq VT300-series and VT220 and VT240 terminals currently support this feature.
  • Page 141: B.1.2 Set Terminal Command

    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 your terminal, make sure to set only those characteristics that are supported by your terminal. If you set characteristics that the terminal does not support, the screen-oriented functions of DECTPU may behave unpredictably.
  • Page 142: B–1 Dcl Command Procedure For Set Term/Nowrap

    DECTPU Terminal Support B.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...
  • Page 143 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 active process or subprocess. DCL process names are case sensitive. CANCEL BREAKPOINT procedure-name Cancels a breakpoint set with the SET BREAKPOINT command.
  • Page 144 DECTPU Debugger Commands SET WINDOW top, length Places the top of the debugger window at the line number specified by the top parameter. Extends the window down by the number of lines specified by the length parameter. The default length is 7 lines. The minimum valid length is 3 lines.
  • Page 145 Index Callbacks, 5–7 to 5–9 handling in EVE, 5–10 CASE statement, 4–21 to 4–22 @ command, 5–27 Case-style error handler, 4–25 to 4–28 Abort Character set, 4–1 resulting from exceeding virtual address space, Character_cell display, 2–12 2–8 /CHARACTER_SET qualifier, 2–9 ABORT statement, 4–24, 4–29 to 4–30 Closures, 5–10 Active editing point, 3–4...
  • Page 146 Debugging (cont’d) /CREATE qualifier, 2–11 STEP command, 5–30, C–2 CREATE_WIDGET built-in procedure to examine contents of local variable, 5–30 using to specify callback routine, 5–8 TPU command, C–2 using to specify resource values, 5–11 DEBUGON procedure, 5–29 CREATE_WINDOW built-in procedure, 3–23 /DEBUG qualifier, 2–12, 5–28 Ctrl/C, 5–16 DECTPU...
  • Page 147 ENDIF statement, 4–20 to 4–21 Function procedures, 4–18 ENDLOOP statement, 4–20 ENDMODULE statement, 4–14 ENDON_ERROR statement, 4–23 to 4–28 Gadget, 3–22 ENDPROCEDURE statement, 4–15 to 4–19 GET_INFO built-in procedure Entering control characters, 4–3 string constant parameter EQUIVALENCE statement, 4–30 "journaling", 2–6, 2–14 Error "journal_file", 2–7, 2–14 resulting from exceeding virtual address space,...
  • Page 148 Journaling (cont’d) layered application control, 2–6 using both keystroke and buffer-change journaling, 2–7 MARK data type, 3–8 to 3–10 "journaling" string constant parameter Marker GET_INFO built-in, 2–6, 2–14 deleting, 3–10 /JOURNAL qualifier, 2–6, 2–14 padding effects, 3–9 to 3–10 "journal_file" string constant parameter video attributes, 3–8 GET_INFO built-in, 2–7, 2–14 Memory...
  • Page 149 Pattern (cont’d) Recursive procedure, 4–18 execution, 3–16 Relational expression, 4–10 expression, 4–11 Relational operators, 3–15 linking (&), 3–13 Removal of window, 3–25 operators, 3–13 Repetitive statements, 4–20 searching, 3–10 Reserved word Pattern assignment built-in procedures, 4–12 partial (@), 3–14 keywords, 4–12 PATTERN data type, 3–10 to 3–17 language elements, 4–13 to 4–14 Predefined constants...
  • Page 150 Showing version number, 5–2 TPU$WIDGET_STRING_CALLBACK callback SHOW_BUFFER variable, 5–24 routine, 5–8, 5–9 Source files for EVE, 2–3 TPU$X_MESSAGE_BUFFER variable, 5–24 Startup files, 2–2 to 2–3, 5–17 to 5–27 TPU$X_SHOW_BUFFER variable, 5–24 command file, 2–2 TPU$X_SHOW_WINDOW variable, 5–24 definition, 2–2 TPU$_UNKLEXICAL error message, 4–34 initialization file, 2–2 TPU command, 5–15 order of execution, 5–18...
  • Page 151 getting information, 3–25 length, 3–23 mapping, 3–24 Widget removing, 3–25 listing of, 5–4 unmapping, 3–25 WIDGET data type, 3–22 unsupported terminals, 3–26 Widget resources updating, 3–25 data types of, 5–10 to 5–11 values, 3–24 specifying, 5–10 width, 3–23 Window WINDOW data type, 3–22 to 3–26 creating, 3–23 current, 3–24 definition, 3–22...

This manual is also suitable for:

Dec text processing utilityDectpu

Table of Contents