Summary of the content on the page No. 1
Guide to the DEC Text
ProcessingUtility
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: This manual supersedes the Guide
to the DEC Text Processing Utility,
Version 3.1
Software Version: OpenVMS Alpha Version 7.3
OpenVMS VAX Version 7.3
The content of this manual has not
changed sinced OpenVMS Version 7.1
Compaq Computer Corporation
Houston, Texas
Summary of the content on the page No. 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. Motif is a registered trademark of the The Open Group. All other product names mentioned herein may be the trademarks or registered trademarks of their respective companies. Confidential computer softwa
Summary of the content on the page No. 3
Contents Preface ............................................................ ix 1 Overview of the DEC Text Processing Utility 1.1 Description of DECTPU ....................................... 1–1 1.1.1 DECTPU Features ........................................ 1–1 1.1.2 DECTPU and User Applications ............................. 1–2 1.1.3 DECTPU Environments.................................... 1–2 1.2 Description of DECwindows DECTPU ............................ 1–2 1.2.1 DECwindows DECTPU and DEC
Summary of the content on the page No. 4
2.6.8 /JOURNAL . . ............................................ 2–14 2.6.9 /MODIFY . . . ............................................ 2–15 2.6.10 /OUTPUT . . . ............................................ 2–16 2.6.11 /READ_ONLY............................................ 2–17 2.6.12 /RECOVER . . ............................................ 2–18 2.6.13 /SECTION . . ............................................ 2–19 2.6.14 /START_POSITION . . . .................................... 2–20 3 DEC Text P
Summary of the content on the page No. 5
4.4 Identifiers . ................................................ 4–5 4.5 Variables . . ................................................ 4–5 4.6 Constants . . ................................................ 4–6 4.7 Operators . . ................................................ 4–7 4.8 Expressions ................................................ 4–8 4.8.1 Arithmetic Expressions .................................... 4–10 4.8.2 Relational Expressions..................................... 4–10 4.8.3
Summary of the content on the page No. 6
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 of Global Selection to Input Focus .................. 5–6 5.2.3.4 Response to Requests for Information About the Global Selection ............................................ 5–7 5.2.4 Using Callbacks .......................................... 5–7 5.2.4.1 Backg
Summary of the content on the page No. 7
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–6 A.4 Running DECTPU from an OpenVMS Subprocess . . . ............... A–7 B DECTPU Terminal Support B.1 Using Screen-Oriented Editing on Supported Terminals .............. B–1 B.1.1 Terminal Settings on OpenVMS Systems That Affect DECTPU ..... B–1 B.1.2 SET
Summary of the content on the page No. 8
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 Procedure to Run DECTPU from a Subprocess .................. A–7 B–1 DCL Command Procedure for SET TERM/NOWRAP . . . ........... B–4 Figures 1–1 DECTPU as a Base for EVE ................................ 1–2 1–2 DECTPU as a Base for User-Written Interfaces ................. 1–5 Tables
Summary of the content on the page No. 9
Preface This manual discusses the DEC Text Processing Utility (DECTPU). Intended Audience This manual is for experienced programmers who know at least one computer language, as well as for new users of DECTPU. Some features of DECTPU, for example, the callable interface and the built-in procedure FILE_PARSE, are for system programmers who understand Compaq OpenVMS operating system concepts. Relevant documents about the OpenVMS operating system are listed under Related Documents. Document Structu
Summary of the content on the page No. 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. Conventions The following conventions are used in this manual: Ctrl/x A sequence such as Ctrl/x indicates that you must hold down the key labeled Ctrl while
Summary of the content on the page No. 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 type). UPPERCASE TEXT Uppercase text indicates a command, the name of
Summary of the content on the page No. 12
Summary of the content on the page No. 13
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 about the DECTPU language • Information about the hardware that DECTPU supports • How to learn more about DECTPU 1.1 Description of DECTPU DECTPU is a high-performance, programmable, text processing uti
Summary of the content on the page No. 14
Overview of the DEC Text Processing Utility 1.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 text processing applications. When you choose an editor or other application to layer on DECTPU, that becomes the interface between you and DECTPU. You can also create your own interface to access DECTPU
Summary of the content on the page No. 15
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. With these procedures, you can create and manipulate various features of a DECwindows interfa
Summary of the content on the page No. 16
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. With DECwindows DECTPU, you can create a wide variety of widgets, designate callback routines for those widgets, fetch and set geometry and text-related resources of the widgets,
Summary of the content on the page No. 17
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 EVE Application Editor D E C T P U ZK−6544−GE You can implement extensions to EVE with any of the following: • A DECTPU command file (DECTPU source code) • A DECTPU section file (compiled DECTPU code in binary form) • An initialization file (commands in a format that EVE can process) Because a DECTPU section file is alre
Summary of the content on the page No. 18
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. A variable in DECTPU assumes a data type when it is used in an assignment statement. For example, the following statement assigns a string data type to the v
Summary of the content on the page No. 19
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 statements and calls to DECTPU built-in procedures. DECTPU procedures can return values and can be recursive. After you write a procedure and compile it, you use the procedure name to invoke it. When writing a procedure, use the following guidelines: • Start each procedure with the word PROCEDURE, followed by the procedure name of your choic
Summary of the content on the page No. 20
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. It also contains material for more experienced users of text editors and explains how to use DECTPU to extend the EVE interface. When you are familiar with EVE, you ma