Digital PDFs
Documents
Guest
Register
Log In
XX-7AB9C-CB
May 1972
134 pages
Original
5.5MB
view
download
OCR Version
5.3MB
view
download
Document:
05 tecoReference
Order Number:
XX-7AB9C-CB
Revision:
0
Pages:
134
Original Filename:
05_tecoReference.pdf
OCR Text
- 221 - DEC-10-ETEE-D decsystermio Teco ~ TEXT EDITOR AND CORRECTOR PROGRAM PROGRAMMER'’S REFERENCE MANUAL This manual reflects the software as of Version 23 of TECO. digital equipment corporation - maynard, massachusetts TECO - 222 - Ist Printing January 1968 2nd Printing October 1968 3rd Printing August 1969 4th Printing April 1970 5th Printing (Rev) October 1970 6th Printing (Rev) May 1972 Copyright © 1968, 1969, 1970, 1971, 1972 by Digital Equipment Corporation The material in this manual is for informa- tion purposes and is subject to change without notice. The following are trademarks of Digital Equipment Corporation, Maynard, Massachusetts: DEC PDP FLIP CHIP DIGITAL FOCAL COMPUTER LAB TECO - 223 - NEW AND CHANGED INFORMATION This manual reflects the software as of version 23. It has been revised to include all new and changed material since version 21A of the TECO software. Change bars in the left margin are used to indicate the new and revised information. TECO - 224 - - 225 - TECO CONTENTS Page CHAPTER 1 INTRODUCTION CHAPTER 2 CONCEPTS 2.1 Data Files 2.2 Character Set 2.2.1 Special Characters 2,2.2 Control Characters 2.2.3 Carriage Control Functions 236 2.2,4 Symbols 236 2.3 Data Format 2.4 Editing Buffer 231 : 7 ‘ 233 233 : 4 234 235 | ' _ 235 237 ) 2.5 Buffer Pointer 2.6 General Command String Syntax 2.7 Arguments 2,7.1 Alphanumeric Arguments 240 2,7.2 Numeric Arguments 241 2.7.3 Commands-That Return a Value 2.8 Q-Registers 2.9 Core Expansion CHAPTER 3 COMMANDS 3.1 Initialization Commands 3.1.1 R TECO Command 3.1.2 MAKE Command : \ 238 239 ' 239 | / 240 243 ‘ : , 243 244 247 247 - 3.1.3 TECO Command 3.1.4 Examples of the Use of Initialization Commands 3.2 File Selection Commands 3.2.1 ER Command 3.2.2 EM Command a7 . 248 250 . 250 ‘ 251 , 251 3.2.3 EW Command 251 3.2.4 EZ Command 253 3.2.5 EB Command 3.2.6 Editing Line=Sequence Numbered Files 3.2.7 Examples of the Use of File Section Commands ’ 253 254 . 254 3.3 Input Commands 255 3.3.1 Y Command 256 3.3.2 A Command 257 3.3.3 Examples of the Use of Input Commands 257 3.4 Special Characters as Buffer Position Numeric Arguments 257 3.5 Buffer Pointer Positioning Commands 258 3.5.1 J Command 258 - 226 - TECO CONTENTS (Cont) Page 2 Examples of the Use of Buffer Pointer Positioning Commands 259 Text Type-Out Commands 260 T Command 260 260 tL Command 261 A nET Command 261 Case Flagging On Type-out 262 Examples of the User Text Typeout Commands 262 s & & WN ‘ Command 264 Deletion Commands 264 K Command 264 265 Insertion Commands 265 | Command 266 Tab Command 266 @1 Command 266 nl e Command 266 n\ Command 267 Examples of the Use of Insertion Commands 267 Case Control with Insert Commands 268 Alphabetic Case Control 268 Special ''Lower Case'' Characters 270 Inserting Control Characters 271 Output Commands 272 PW Command 272 P Command 272 EF Command 274 Examples of the Use of Output Commands 274 275 Exit Commands 275 EX Command 276 EG Command @ and @ Commands 276 278 — S Command N FS Command w — Search Commands N Command — Examples of the Use of Deletion Commands — —h O _CJOOO‘WO~ w D Command — 259 U . o & — s = W U oA L Command & R Command & 258 258 C Command 279 279 279 vi - 227 - TECO CONTENTS (Cont) AW N - V0 ® il — — = el ol eedd ek veed el o eed el cmed e DNAEDNMDBDBDRNEWO®®®®RRINN — — — o o = ® WL oG A Page 281 @Modifier 281 Colon Modifier ' 281 Automatic Typeout After Searches 282 Case Control in Searches 282 Alphclbefvic Case Control in Search Arguments 282 Special "'Lower Case'' Characters 285 Control Characters in Search Arguments ~ Case Match Mode Control in Searches’ 286 Examples of the Use of Search Commands 287 Iteration Commands 289 Angle Bracket (<...>) 289 seed ) Flow Control Commands 289 - 291 el el el amd eeed et ssdd e Command String Tags el 291 O Command 292 Conditional Execution Commands 292 Examples of the Use of Flow Control Commands 293 Q-Regigter Commands 295 Commands for Storing Integers 295 U Command 295 Q Command 295 295 X Command 295 G Command 296 N 295 M Command A % Command Commands for Storing Character Strings Saving the Previous Command String A N.—l 285 285 Special Match Control Characters Semicolon Command A DA et A 280 Search Command Modifiers Q-Register Pushdown List 297 A o 280 Backarrow Command Examples of the Use of Q-Register Commands 297 O — FN Command Numeric Typeout Command 300 296 296 300 Examples of the Use of the Special Numeric Arguments 302 7 TECO Programming Aids 17.1 @ Command o ‘Special Numeric Values 16,1 303 7.2 Question Mark (?) Command 304 17.3 The EO Value 304 vii TECO - 228 - CONTENTS (Cont) 306 Carriage Return, Line Feed, and Spaces 306 CHAPTER 4 TECHNIQUES 4.1 Creation, Execution, and Editing of a FORTRAN Program 307 4.2 Rearranging a File 309 4.3 Splitting and Merging Files 310 4.4 Example of an Advanced TECO Macro 313 CHAPTER 5 USER ERRORS Erasing Commands 319 Rubout Command 319 Double @ Command 320 SR AW NN — RN RN TR RTINS W Command String Type—=in Control Commands 3.18.1 NN 3.18 AT Page Command 320 Bell-Space Command 321 Error Messages 321 Question Mark Command 322 Slash Command 323 EH Command APPENDICES APPENDIX A TECO ERROR MESSAGES 325 APPENDIX B ASCII CHARACTERS 337 APPENDIX C SUMMARY OF COMMANDS 345 viii - 229 - TECO CONTENTS (Cont) Page TABLES: 2-1 Special Characters 2-2 Special Symbols 236 2-3 Numeric Operators 241 3-1 EM Commands 252 235 Special Buffer Position Arguments 258 3-3 L Commands 259 3-4 T Commands 3-5 K Commands 3-6 3-7 P Commands - Conditional Execution Commands 260 264 273 293 TECO Error Messages 325 B-1 ASCII Characters 1337 C-1 Command Description 345 TECO - 230 - - 231 - TECO Chapter 1 Introduction Thi; manual is a complete reference manual for the advanced TECO user. It is not designed to be used as a beginner's text, and people who are learning TECO should not use it as such. Beginners are re- ferred to the tutorial ''Introduction to TECO'', which appears in Section | of the DECsystem=10 Users Handbook. TECO is a powerful text editor for use with all DECsystem-10 systems. user to easily edit any ASCII text. TECO enables the advanced Most editing can be accomplished using a few simple commands; or the user can select any of a large set of sophisticated commands, such as character string searching, command repetition, conditional commands, programmed editing, and text block movement. Refer to Appendix C for a summary of the commands available. TECO editing is normally done on-line, using the terminal. However, the user ¢an also write his editing commands as a TECO command file and have his editing task run by an operator. TECO is a character-oriented editor; one or more characters in a line can be modified without retyping the rest of the line. Any source document can be edited: programs written in FORTRAN, COBOL, MACRO~-10, or any other language, as well as mefnoranda, specifications, and other types of arbitrarily-formatted text. TECO does not require that line numbers or any other extraneous in= formation be associated with the text. The full ASCII character set, printing and nonprinting characters alike, can be processed. TECO requires a minimum of 5K of core memory, 3K of which:is shared in a reentrant system, TECO takes advantage of any additional core available to expand its buffers, as required. A single terminal is required for typing in commands. I/O device. 1-1 Data can be input or output on any standard TECO | - 232 - -233 - : TECO Chapter 2 Concepts 2.1 DATA FILES DECsystem~10 TECO operates on ASCH data files. The input file is the file that the user wishes to change. The output file is the file that receives the newly created or edited data. Inputting is defined as the process of reading in data that already exists in some computer-readable form (paper tape, disk file, etc.). another user's terminal). Data can be input from any device except the user's terminal (or Inserting is defined as the actual typing in of new data and is done only at the user's terminal. In the case of such hard-copy devices as the card reader and the paper-tape reader, only the device need be specified to open a file for input or output. For disk and DECtape files, filenames, as well as the device, must be specified. If no device is specified, the device DSK: is assumed. Magnetic tape files are specified by naming the tape drive and by using special TECO commands to position the tape properly. Any 1/O device name acceptable to the monitor can be used. - Some examples are: DSK: Disk (including drums) DTAn: DECtape (n is the number of the drive on which the tape is mounted) MTAn: Magnetic tape (n is the number of the drive on which the tape is mounted) CDR: Card reader CDP: Card punch PTR: Paper-tape reader PTP: Paper-tape punch LPT: Line printer TTYn: Terminal number n, usually a terminal having a lowspeed reader or punch 2-1 TECO - 234 NOTE TTYn: used as an /O device must be different from the user's terminal and must not be the terminal of any attached user. Filenames for disk and DECtape files consist of two parts: the first part, the filename proper, consists of from one to six alphanumeric characters; the second part, which is optional, is called the ''filename extension.'" If given, the filename extension consists of from one to three alphanumeric characters and is separated from the filename proper by a period. defined as null and as such is distinctive. If the filename extension is not given, it is In the case of a null filename extension, the period after the filename proper can be omitted. Examples of filenames: 2.2 TECO. 21 The source file for TECO version 21 EARNNG .F4 A FORTRAN source program 0015J.CBL A COBOL source program GLOB.MAC A MACRO-10 source program GLOB.BAK A backup file FRMTTR.TEC A file containing a TECO macro M20 A filename with null extension M20.1 A similar filename with non=null extension CHARACTER SET The TECO character set is the full ASCIl set. To obtain particular information about individual char- acters, the user should refer to the table of ASCIl characters in Appendix B. This table contains the following: a. A list of all ASCIl characters and the symbols used in this manual to represent them, - b. octal and decimal values of the characters, and, c. comments concerning any special significance of each character. In general, the user must be concerned with the character set on two levels: the data level and the command level. Every ASCIl character from control=A (decimal value 01) through rubout (decimal value 127) is legal in TECO data. They can all be input and output, and they can all be inserted. that is not completely legal as data is the null character (decimal value 0). inserted and output, but it is ignored on input. The only character The null character can be Form feed characters (decimal value 12) are com- pletely legal in data but are treated specially on input (see Sections 2.3 and 3.3). Most of the ASCII characters have some meaning when used as commands. Some are monitor commands. When used as commands, the lower-case characters have the same meaning as their upper-case 2-2 - 235 - equivalenfs | TECO The tablein Appendlx B tells wherein this manual the uses of the various characfers as commands are explained. 2.2.1 Special Characters Because of their use as special immediate-action commands (monitor control commands or erasing commands), certain characters must not be typed in explicitly as alphanumeric. arguments. All of them, however, are legal as data (except the null character) and can be inserted using special techniques. The characters to which this restriction applies are referred to in this manual as ''special characters.'' These special characters are listed in Table 2-1. Table 2-1 + - Special Characters Character @ ‘ | (cpnfroI-C) @ @ (two successive control-G's) ’ @‘_‘ A monitor command An ef'asin‘g command ' (A single control-G is acceptable.) (control-G, space) ' @ | Immediate editing command (causes current line to be retyped). (control-O) ) ESCape A monitor command (control-U) or PREfix ALTmode or @ - Remarks . An erasing command : Equivalent to ALTmode ' Standard text argument terminator (Two successive ALTmodes terminate a * command string.) Rubout An erasing command Tln monitors preceding the 5.02 monitor the characters @ , and . are also monitor commands and must be includedin the above"list For these systems. 2.2.2 Control Characters Control characters are characters that are typed by holding down the CTRL key while striking a character key. The control characters have decimal values O through 31. When TECO is printing text, a control character is printed as an up=arrow, followed by the character which is typed to produce the control character. For example, control-A prints as '' tA'!, In many cases the control character commands can be typed into command strings by using an alternate procedure to the standard method of holding down the CTRL key while striking the desired character. 2-3 - 236 - TECO Instead, the user can first type up-arrow and then type the desired character without depressing the CTRL key. For example, when used as a command, the two-character sequence up-arrow, H (denoted by tH) is equivalent to the single character control~H (denoted by @ ). This method can be used only when the control character is typed as a command, not when it is typed as text or as an alphanumeric argument. Control characters appearing as text arguments must be preceded by a . Exceptions are noted at appropriate places throughout the manual. 2.2.3 Carriage Control Functions A few of the control characters are the special terminal functions: bell, tab, line feed, vertical tab, form feed, and carriage return. All of these characters echo by performing their particular function; they also perform this function when TECO is printing out text from the buffer. When a carriage return is typed in, the monitor automatically generates a line feed following it. The echo to the carriage return type=in is a carriage return followed by a line feed. If the carriage return is typed as an insert, a line feed is automatically inserted immediately after the carriage return. Altmode (or escape or prefix) echoes and prints out as a dollar sign. 2.2.4 Symbols In the examples in this manual, some special symbols are used to clearly indicate what the user must type. These special symbols are listed in Table 2-2, In all examples containing both characters typed by the monitor or TECO and characters typed by the user, the characters typed by the monitor or TECO are underlined. Carriage control characters (carriage return, form feed, etc.) typed by the user are indicated through use of the special symbols. . Table 2-2 Special Symbols Symbol Character -] tab { ‘ ORO ! »@@) line feed vertical tab form feed carriage return space altmode rubout control-A tA up-arrow -followed by A (Other control characters similarly denoted) 2-4 - 237 - 2,3 TECO DATA FORMAT TECO is capable of editing text written in any format. There are, however, features in TECO that make use of the concept of a line and the concept of a page. Therefore, the user must know how these concepts are defined in TECO, Lines can be of any length. tab, and form feed. The characters that define the end.of a line are the line feed, vertical The end of the editing buffer also counts as an end-of-line character if there is no other end-of-line character at the end of the buffer. When TECO counts lines, it does so by counting these end-of-line characters. An end-of-line character is considered to belong to the line that it terminates. Examples: The following text comprises three lines of text as defined by TECO: LINE ONE } | ) 4 LINE TWO LINE THREE ) } The following text is considered to be two lines: BEGINNING) OVERPRINT The first line is terminated by the - @ (/) CONTINUATION )¢ character and the second by the | character. Text to be edited by TECO does not have to contain end-of-line characters; however, if it does not contain them, those features of TECO that count lines will not be useful. "NOTE If the EO value has been set to 1, the only end=of-line character is the line feed (refer to Paragraph 3.17.3 for a description of the EO value). ' Pages are defined in TECO by form feed characters, which act as page separators. sidered to belong to either of the two pages that they separate. They are not con- Two consecutive form feed characters delimit a null page. A form feed charater at the beginning of a file delimits a nul page at the be- ginning of the file. A form feed character at the end of a file has no effect in TECO. omitted. It can be TECO - 238 - Examples: The following file consists of two pages: LINE ONE ) ! LINE TWO J ! LINE THREE J! LINE FOUR ) The following consists of four pages; the first and third pages are null: (FORMILINE ONE ) LINE TWO J ! EoRrRM (FORMLINE THREE ) ! LINE FOUR Q! TECO operates most efficiently with files that are divided into pages of approximately fifty or fewer lines. Files with longer pages or files containing no form feed characters can be edited with TECO; but, this process requires either additional core storage or more care when editing. The processing of form feed characters by TECO must be thoroughly understood by the user. The page concept is further discussed in relation to the size of the editing buffer in Section 2.4, and the relation of form feed characters to input and output commands is discussed in Sections 3.3, 3.9, 3.10, aond 3.11. TECO may be used to edit files containing the special line~sequence numbers produced by BASIC, the PIP /S switch, LINED, and several other editors, but TECO does not need these numbers and makes no special use of them (nor does it destroy them). See Section 3.2.6 for an explanation of how these numbers may be processed. 2.4 EDITING BUFFER Editing is accomplished by: a. Reading text into the editing buffer b. Moking changes to the text in this buffer c. ~ Writing the modified text out to a new file The editing buffer is a block of core memory within TECO. Data is put in the editing buffer when it is read in or inserted; it is kept in the editing buffer while it is being modified. Text is packed in the editing buffer with five 7-bit ASCIl characters per 36-bit word. When TECO is running in the minimum 5K of core, the editing buffer holds approximately 3600 characters. Each additional 1K of core assigned to TECO increases the size of the editing buffer by 5120 characters. 2-6 - 239 - | TECO TECO normally passes data into and out of the editing buffer a page at a time. Pages are delineated by form feed characters (see Sections. 2.3 and 3. 3). 2.5 BUFFER POINTER TECO is a character-oriented editor, therefore, the concept of the buffer pointer must be understood " by the user. The position of the buffer pointer determines the effect of many editing commands. For example, insertion and deletion always take place at the current position of the buffer pointer. The buffer pointer is a movable position indicator. It is always positioned between two characters in the editing buffer, or before the first character in the buffer, or after the last character in the buffer. It is never positioned exacHy/g_r_'l_ a particular character; it is positioned either immediately before or after the character. The pointer can be moved forward or backward over any number of characters. It cannot be moved beyond the boundaries of the buffer; i.e., it cannot be moved further back than the position immedi- ately prior to the first character in the buffer, and it cannot be moved further ahead than the position immediately ofter the last character in the buffer, In the examples in this manual showing text in the editing buffer, the position of the buffer pointer is shown by a caret (/\) directly under the line of text. Example: TEXT IN THE ED/I{ING BUFFER When discussing text in the editing buffer in terms of lines, the phrase ''current line'' is frequently used. The current line is the line at which the buffer pointer is currently directed. The pointer can be positioned either at the beginning of the line or in the interior of the line. 2.6 GENERAL COMMAND STRING SYNTAX Commands are given to-TECO by typing a command string; command strings are formed by writing a series of commands, one immediately after the other, and concluding with two consecutive altmodes (refer to Appendix C for a summary of commands). A command string may be typed after TECO indicates that it is ready by printing an asterisk. An example of a command string is as follows: *YIHEADING (§) 2K4DNTAG (§) 2T Execution of the command string begins only ofter the two consecutive altmodes have been typed. - TECO then indicates that it is beginning execution of the command string by typing a carriage return- 2-7 TECO - 240 - line feed. At that point, each command in the string is executed in turn, starting at the left. When all commands in the string have been executed, TECO prints another asterisk indicating it is ready to accept another command string. If a command in the string cannot be executed due to a command error, execution of the command string stops at that point, and an error message is printed. I Commands preceding the command in error are executed. The erroneous command and the commands following it are not executed. Errors, error messages, and recovery techniques are fully discussed in Chapter 5. There are exceptions to the general rule that commands are not executed until the end of the command string has been indicated by two consecutive altmodes. These exceptions are the commands listed in Table 2-1 in Section 2.2, 2.7 ARGUMENTS 2.7.1 Alphanumeric Arguments Most alphanumeric arguments are text arguments that are interpreted as ASCIl data by TECO. examples of text arguments are: Some data to be inserted in the buffer, search character strings, and com- mand string tags. Other types of alphanumeric arguments are device and filenames and Q-register names, An alphanumeric argument always follows the command to which it applies. As a rule, most commands that take text arguments require that the argument be terminated by an altmode; however, there are exceptions to this rule which are explained at appropriate places in the manual. An altmode used to terminate an alphanumeric argument can also function as one of the two altmodes necessary to terminate a command string. | = | * Example: ITEXT e STEXT2 The alphanumeric argument, ""TEXT"', is terminated by an altmode. The second argument, "'"TEXT2'', is also terminated by an altmode, but this altmode is also used as one of the altmodes terminating the command string. Any printable ASCII character is legal in an alphanumeric argument with the exception of the special I characters listed in Table 2-1, Section 2.2. In addition, non-printing characters are legal when they are preceded by a Q’@ 2-8 - 241 - 2.7.2 TECO Numeric Arguments Numeric arguments always precede the command to which they apply. In some cases, only a single numeric argument is required; in others, a pair of numeric arguments is required. When two numeric arguments are used, . they are separated by a comma. In most cases, numeric argu- ments must be positive; however, some commands allow a numeric argument to be negative or zero. The number and type of numeric arguments allowed by each command are stated in the section in which that command is explained. Where a numeric argument is used to specify a buffer position, the number used is the number of characters in the buffer to the left of that position. Thus, n means the position to the right of the nth character in the buffer (between the nth and n+ 1st characters). Numeric arguments used in. pairs are always buffer position arguments. Such a pair specifies all the characters in the buffer that lie between the two buffer positions represented by the two arguments. This definition is precise because the term ''buffer position'' always indicates a position before or ofter a given character, not ''on'' or ''af'' the character. Example: 12,20 - This argument pair specifies the thirteenth (13th) through the twentieth (20th) characters in the buffer. These characters are specified because the 12 indicates the position between the 12th and 13th characters, and the .20 indicates the position between the 20th and 21st characters. Numeric arguments can be used in arithmetic/logical combinations. The characters shown in Table 2-3 are used as operators. Table 2-3 Numeric Operators Operator -+ + space - | _ Function | Ignored, if used before the first term Example +2=2 in a string. Addition, if used between two terms. Equivalent to +, Negation, if used before the first term in a string. 5+6=11 e 222 Sb6=11 -2==2 TECO - 242 - Table 2-3 (Cont) Numeric Operators Operator Function Example - Subtraction, if used between terms. 8-2=6 * Multiply. 8*2=16 / Integer Divide (and drop the remainder). 8/2=4 Bitwise logical AND of the binary 12 &10=8 & (Used between two terms.) (Used between two terms.) representations of two terms, if used 8/3=2 between the terms. # Bitwise logical OR of the binary representations of two terms, if used 12# 10=14 between the terms. When more than one arithmetic/logical operator is used in a single numeric argument, the operations are performed from left to right. This sequence can be overridden through use of parentheses (). operations within parentheses are performed before those outside parentheses. Parentheses can be nested. In TECO, numbers are ordinarily assumed to be decimal integers. Preceding a number with tO (uparrow-O, not control-O) causes the number to be read in octal radix. Example: tO177 is equivalent to 127, Examples: 3*1010=24 243 * 4=20 2H3 * 4)=14 243 * (16/(3-1) ) /2 H2 * 5) ) =24 2&(3%5) # 16=18 -((2+(3*4)-18&(6+8)) /2) =-6 The arithmetic/logical operators and parentheses can be used to form one or both of the numeric arguments in a pair. Example: 260 - (3 * 42), 250 + (77/3) All 2.7.3 TECO | - 243 Commands That Return a Value Generally speaking, there are two main categories of TECO commands: 1) those that perform some operation, such as inserting text, and 2) those that ''return'' a value, such as the number of characters in the editing buffer. (There are also some commands that do both.) A command is said to ''return'’ a value if the command causes the current value of some quantity to be calculated, and then the command takes on this value, becoming itself a numeric argument that may be used by another command. Using such a command is equivalent to typing the particular number that the command returns as a value, except that the value is not usually known in advance. This value can then be used as.an argument by the next:command in the command string, provided that the command is one that can take a numeric argument. Otherwise, it is ignored. An example of a command that returns a value is the Z command (see Section 3.4). The Z command returns a value equal to the number of characters in the buffer. It has no other function. Thus, in order to be useful, Z must be used as a numeric argument preceding another command. Commands that return values may be used in arithmetic/logical combinations with each other and with explicit numbers. All the same rules apply. Each command that returns a value has all the properties of a humber that has been explicitly typed in. If commands that return values are concatenated with each other or with digits, the value returned is that of the last command or number in the string. An operator preceding such a string continues to apply. Examples: 77 =17 748 = 48 -27 = -Z BHZZ =347 2.8 Q-REGISTERS Q-registers are dafa storage registers that are available to the TECO user. Q-registers give a great amount of editing power to the user by enabling programmed editing and text block movement. Data stored in Q-registers is not disturbed by the flow of data into and out of the editing buffer. [t can be preserved throughout an entire TECO job, and it is available for retrieval or change at any time. There are 36 Q-registers; each Q-register has a single character name, which is either one of the digits O through 9, or one of the letters A through Z. Also, there is a Q-register pushdown stack that effectively makes available an additional 32 Q-registers for certain applications. 1 The number of entries in the pushdown stack can be increased by changing the parameter LPF in TECO.MAC and reassembling TECO. TECO - 244 - Two types of data can be stored in Q-registers: decimal integers or alphanumeric character strings. For numeric storage, a Q-register can be used to hold a single positive, negative, or zero decimal 35 4 cng 2% integer in the range -2 1. Numbers stored in Q-registers can be incremented, tested, or recalled. Hence, Q-registers can be used as switches and counters, as well as for simple data-save functions. For text storage, a Q-register can be used to hold a character string of any length. character strings can be stored: ordinary text and TECO command strings. Two types of Ordinary textual data stored in a Q-register is copied into the Q-register from the editing buffer without destroying the copy in the editing buffer. Storing text in a Q-register is useful for functions such as making many copies of a given segment of text throughout a file without retyping it each time, for moving a block of text ~ from one position to another in a file, and for moving a block of text to another file. Textual data in the form of TECO command strings can also be stored in Q-registers. Such a command string can be executed over and over throughout an editing job, much like calling a subroutine. This feature also enables an editing job to be typed up off-line and then executed by an operator at a later. time. 2.9 Such command strings can be edited just as any other text. CORE EXPANSION The minimum 5K of core memory is allocated within TECO in the following manner. The executable code is allocated 3K of core memory; this code is pure and is shared in a reentront system. 2K of core memory is allocated to the data segment. The other Part of the data segment is used for program variables and fixed-length 1/O buffers, while the rest is used for three variable-length storage areas: a. The editing buffer, b. the command string buffer, and c. the storage area for Q-registers containing text. When TECO is initialized, the three variable=length storage areas are assigned a specific amount of space. After a command string is executed, the command string buffer is cleared. leted from the editing buffer, the formerly occupied space is reclaimed. When text is de- However, during a TECO job, conditions can arise where the available space is not sufficient for the three variable-length storage areas. For example, a command string having a single insert command with many lines of text to be inserted may overflow the command string buffer. In such a case, TECO attempts to obtain the required space from one of the other variable~length storage areas. If, however, all three areas are filled to such an extent that the total amount of space allotted to all three is insufficient, TECO automatically requests another 1K of core memory from the monitor. If the request for more core is successful, operation continues normally. TECO prints a message of the form '"{nK CORE]"" (where n is the new number of 1K segments of (low) core allocated to the - 245 - ‘ user) to inform the user that his core has been expanded to the specified amount. suppressed while the user is typing a command string.) TECO (This message is If the request for more core is unsuccessful, TECO stops execution of the command string at this point and prints the error message ?COR Storage Capacity Exceeded, | ' TECO - 247 - ' TECO Chapter 3 Commands 3.1 INITIALIZATION COMMANDS / TECO is called by giving one of three different initialization commands to the monitor. An initialization command can be given whenever the monitor has typed a period to indicate that it is waiting “for a new command. 3.1.1 R TECO Command The general TECO initialization command is the command: * .RTECO ) This command calls TECO into core and initializes the program for general use. It does not automati~ cally initialize any particular devices or files for input or output. When initialization is complete, an asterisk is typed fo indicate that TECO is ready to receive a command. This state, ih which TECO waits for command string type in, is called command mode or the idle state. The R TECO command can be given with an argument: -RTECOn) where n is a decimal integer. The argument is used to request more than the minimum of 5K of core memory for the TECO job. - If n is greater than 5, the monitor initializes the user's TECO job with nK of core, if possible. If n is not greater than 5, it has no effect. 3.1.2 MAKE Command | The two main uses of TECO are (1) to create a new file, and (2) to edit an existing file. These two uses are so common that there afe special monitor commands to initialize TECO for executing them. The command: . MAKE dev:filnam.ext[proj, progl ) 3-1 TECO - 248 - is used to initialize TECO for creating a new file. command, gives fo the new file. output device. Filnam.ext is the name that the user, using this Dev: is the device on which the file is to be created; it can be any If dev: is omitted, DSK: is assumed. If the output device is a disk device, [proj, prog]l is used to specify the user area in which the file is to be created; if [proj, prog] is omitted and the device is DSK:, the file will be created in the user's own disk area. For a more precise explanation of file specifications (dev:filnam.ext[proj, progl), see Section 3.2.1. The MAKE command opens a new file to receive output from TECO and gives it the name specified. Once the file has been opened, it is then actually created by using the insert and output commands. Care should be used in the choice of the filename used with a MAKE command. If there is already a file on the system device with the name specified, the MAKE command will cause the old file to be overwritten and TECO will output the warning message % SUPERSEDING EXISTING FILE. [f the user does not wish to supersede the file, he should type @ to return to the monitor. If no filename is used with a MAKE command, the name of the last ASCII file used in @ MAKE command or any other edit-class command (MAKE, TECO, EDIT, or CREATE) is used. If no filename is given in a MAKE command and no edit-class command was previously given, the error message ''COMMAND ERROR"' is typed. When initialization is completed, TECO types an asterisk to indicate its readiness to receive a com= mand string. Usually the first command following a MAKE command is an insert command. . MAKE dev:filnam.ext[proj, progl ) is equivalent to .RTECO) *EWdev:filnam.ext [proj, prog] 3.1.3 TECO Command The command .TECO dev:filnam.ext [proj, progl) is used to initialize TECO for editing an existing file on disk or DECtape. The file specifications dev:filnam,ext [proj, progl are interpreted in the same way as for the MAKE command, except that the device must be a directory-structured device (disk or DECtape). The filename and filename extension must be exactly the same as those of the file that is to be edited. 3-2 TECO | - 249 - The TECO command opens the specified file for input and reads in the first page of that file. It also “opens a new file, with a temporary name, for.ou’rpuf of the edited version. The temporary name is of the form nnnTEC.TMP, where nnn is the user's job number, including leading zeros. When output of the new version is completed, the original (input) version of the file is automatically renamed filnam.BAK, and the new version is given the name of the original file. This operation is identical to that used for the EB command (see Section 3.2.5). If no filename is specified in a TECO command, the name of the ASCII file last referenced in any edit= class command is assumed. If no filename is specified and no edit-class command has previously been given, the error message ''CO MMAND ERROR" is typed. The TECO command cannot be used with a file having the filename extension .BAK, nor with a file name nnnTEC.TMP, where nnn is the user's job -number. When initialization is completed, TECO types an asterisk to indicate its readiness to receive a command string. The command .TECO dev:filnam. ext [proj, progl) is equivalent to .R TECO jE_Bdev:FHnam.exf [proj, prog]l Y If the project-programmer number spegified in-a TECO filnam.ext [proj, progl command is different from the user's project-programmer number,' the action of the TECO command is somewhat different from that of the standard TECO command explained above. In this case the named file is taken for input from the specified prouiect-programmer area, but the output file is written in the user's own disk area with the same name as the input file. This operation is identical to that used for the EB command (see Section 3.2.5). If [proj,progl is not the user's project-programmer number, the command: - .TECO filnam.ext [proj,progl) is equivalent to .RTECO) *EBfilnam.ext [prO],prog] .Y or to .RTECOJ *ERfilnam.ext [pro1 prog].EWfllnam ext.Y and the input file is not renamed to filnam.BAK. - 250 - TECO NOTE The R TECO command must be used for jobs involving editing a file on a device other than disk or DECtape, or for editing a file named nnnTEC.TMP, or a file with the filename extension .BAK. The R TECO command is also preferred with complex editing jobs, where user errors are likely, because of the greafer control it gives over the input and output files. The R TECO command requires the use of file selection commands (see Section 3.2), whereas the MAKE and TECO commands do not. 3.1.4 Examples of the Use of Initialization Commands % .MAKE EARNNG.F4) This command initializes TECO for creation of a FORTRAN file named EARNNG.F4.. .TECO LIB40.MAC ) This command initializes TECO for editing the existing file LIB40. MAC. At the completion of editing, TECO automatically changes the name of the original version of LIB40.MAC to LIB40.BAK and gives the name LIB40.MAC to the new version. .TECO ) This initializes TECO for editing the disk file last referenced in an edit-class com- mand (MAKE, TECO, EDIT, or CREATE). * .RTECO ) - 3.2 This is the command to initialize TECO for general ~purpose editing. FILE se= lection commands (see Section 3.2) should follow. FILE SELECTION COMMANDS File selection is the specification of the device from which input is to be taken and the device to which output is to go. In the case of magnetic tape, file selection also involves positioning the tape. In the case of directory-structured devices, disk and DECtape, a filename must be specified in addition to the device. If the user wants only to create a file, or to edit an existing disk or DECtape file, file selection can be done by using either of the previously described initialization commands. . MAKE dev:filnam.ext [proj, progl ) or .TECO dev:filnam.ext[proj, progl) In all other cases, and in particular if the user initializes TECO with the R TECO command, one or more of the file selection commands described in this section must be used. - 251 3.2.1 TECO ER Command The ER command is used to select a file for input. The general form is *ERdev:filnam.ext [proj, progl where a. dev: is the device name, which can be any name acceptable fo the monitor. b. [proj,progl is ignored when used with a device other than disk. proj is the project number and prog is the programmer number of the disk area where the specified file resides or, in the case of output, is to be written. If [proj,progl The device name must be followed by a colon. default value DSK: is assumed. If dev: is omitted, the is omitted and the device is a disk, the user's project-programmer number is assumed. c. filnam.ext need be used only if the device is a directory device, i.e., disk or DECtape. filnam is the one-to-six character filename, and ext is the one-to three character filename extension conforming to the rules stated in Section 2.1. If the device is a disk or DECtape, filnam must not be omitted; .ext must not be omitted unless the null extension is explicitly intended. d. The ' (altmode) functions as the argument terminator. The ER command terminates input from any file that may have been previously opened for input, and then opens the specified file for input. The user may open one file for input, read only part of that file, and then, with another ER command, release the first file and open a new file for input. If is not necessary to read.to the end of a file before opening another. However, opening the second file does end input from the first. never more than one input file active. There is In Section 4.4, an example is given showing how to use multi- ple ER commands to merge parts of several files. Data cannot be input without first giving an ER, or equivalent, command. 3.2.2 EM Commond EM commands are used to position a magnetic tape for input or output. However, EM command apply only to the magnetic tape that is currently open for input (i.e., opened by the latest ERMTAn: command). To position a maghétic tape for outnut, it is necessary to first initialize the tape for input, then do the desired EM function, and then reopen the device for output. The function of an EM command is determined by the value of a single numeric argument preceding the EM. 3.2.3 The various EM commands are shown in Table 3-1. EW Command The EW command is used to select a file for output. *EWdev:filnam.ext [proj, prog] The general form is - 252 - TECO The EW command opens the specified file for output. If any output file is already active, a new EW command closes that file before opening the new file. Only one output file can be active at any one. time. If a previously active output file is closed by an EW command, that closed file contains all ond only that data supplied to it by output commands preceding the new EW command. If there is already an output file with the name specified, the EW command causes the old file to be overwritten and TECO outputs the warning message % SUPERSEDING EXISTING FILE. Multiple EW commands may be used without changing the input file. In Section 4.3, an example is given showing how to use this technique in order to split a single input file into several parts. The MAKE filnam.ext initialization command causes an automatic EWDSK :filnam. ext to be executed. command Ovutput may not be done without first giving an EW, or equivalent, command. Table 3-1 £M Commands Command Function EMor 1EM Rewind the currently-selected input magnetic tape to load point. 3EM Write an end-of —file record on the input tape. 6EM Skip ahead one record. 7EM Back up one record. 8EM Skip ahead to logical end-of-tape (defined by two successive end-offile marks). The 8EM command leaves the tape positioned between the two endof file marks so that successive output correctly overwrites the second EOF, 9EM Rewind and unload. T1EM Write 3 in. of blank tape. 14EM Advance tape one file, Thisleaves the tape positioned so that the next item read wiil be the first record of the next file (or the second end-of-file mark at the logical end-of -tape). 15EM Backspace tape one file. This leaves the tape positioned so that the next item read will be the end-of-file mark preceding tha file backspaced over (unless the file is the first on the fape). NOTE The EM commands do not clear the internal input buffers. It is best to reinitialize with a new ER command before doing an EM command. -253 - 3.2.4 TECO EZ Command The EZ command is used only with disk, DECtape, or magnetic tape. lis function is equivalent to that of the EW command except that before opening the specified output file it zeros the output device directory if the device is a disk or DECtape, or it rewinds the tape if the device is a magnetic tape. For other devices, it is treated exactly like an EW.: The form is *EZdev:filnam. ext [proj, prog] 3.2.5 EB Command The EB command is used to open a file for editing in a manner similar to the initialization command TECO dev:filnam.ext [proj,progl) . It can be used only for files on a disk or DECtape. The general form of the command is *EBdev:filnam. ext [proj, prog] The exact c'>perafiion of the EB command is as follows: First, the EB command executes an automatic ERdev:filnam. ext . command, opening the specified file for input and releasing any previously opened input file. Then, it opens a temporary file to receive the output of the edited version of the input file. This temporary file is named nnnTEC.TMP, where nnn is the user's job number with leading zeros. This action is equivalent to executing the command EWdev:nnnTEC.TMP ‘ The output device is the same as the input device. Finally, the EB commaid sets an internal flag indicating that special action must be taken when the EB file is closed (by an EF, EX, or EG command - see Sections 3.9 and 3.10). It also prohibits any further EW, EZ, or EB commands until the file is closed. When the EB file is closed, the following action takes place. First, if there already exists on the device a file with the name filnam.BAK, it is deleted. Then, the input file filnam.ext is renamed filnam.BAK. Finally, the output file, nnnTEC,TMP, is renamed filnam.ext. The effect of using the EB command is analogous to editing a file in place, to itself, and converting the original version into a backup file. It updates the specified file and keeps the most recent previous version as a backup file. If the project-programmer number specified in an EBfilnam. ext [proj, progl command is different from the user's, then the input file is taken from the specified area, but the output file is written in the user's own area with the same name as the input file. In other words, if [proj, progl is not the user's project=-programmer number, *EBfilnam.ext [proj, progl is equivalent to *ERfilnam.ext [proj, prog] EWfilnam.ext The EB command cannot be used with a file having the filename extension .BAK nor with a file named nnnTEC.TMP. The TECO dev:filnam.ext [proj, progl) ini- tialization command causes an automatic EBdev:filnam. ext [proj, progl be executed (followed by an automatic Y command). 3-7 to TECO 3.2,6 - 254 - Editing Line-Sequence Numbered Files Some ASCII files, e.g., those created by BASIC, PIP with the /S and /O switches, and LINED, have a special type of line number at the beginning of each line. These ''line~sequence numbers'' conform to certain rules so that they may be ignored or treated specially by compilers and other programs. The standards for line-sequence numbers are given in the LINED Program Reference Manual. TECO does not need line=sequence numbers for operation, but TECO can be used to edit files con~taining them. If such a file is edited with TECO the line-sequence numbers are, in the normal case, simply preserved as additional text at the beginning of each line. deleted, edited, and inserted exactly like any other text. The line-sequence numbers may be On output the line-sequence numbers are .output according to the standard, except that the tab after the number is output only if it is already there. Leading zeros are added as necessary. [f a line without a line-sequence number is en- countered, a line=sequence number word of five spaces is placed at the beginning of the line. The following switches are available for use with line-sequence-numbered files. These switches are merely added to the appropriate file selection command. ERdev:filnam.ext [proj, progl /SUPLSN EBdev:filnam.ext [proj, progl /SUPLSN causes line=sequence numbers to be suppressed at input time. The numbers will not be read into the editing buffer. Also, the tabs following the line=sequence numbers, if they exist, will be suppressed. EWdev:filnam.ext [proj, prog]l /SUPLSN causes the line=sequence numbers to be suppressed at output time. Tabs following the line-sequence numbers will also be suppressed if they exist. EWdev:filnam.ext [proj, progl /GENLSN EBdev:filnam.ext [proj, progl /GENLSN causes line=sequence numbers to be generated for the output file if they did not already exist in the input file. Generated line-sequence numbers begin at 00010 and continue with increments of 10 for each line. Note that these switches are needed only if a change is fo be made in the format of the file being edited. If no switches are specified, a file is output in the same form as it was input. 3.2.7 Examples of the Use of File Selection Commands (§) (§) -* ERDTA2:CREF.2 CD($) EWDSK:CREF.3 . . * DECtape file CREF .2 on DECtape This command string selects the drive 2 for input and opens a file called CREF.3 on the disk for output. If there is a file named CREF.3 already on the disk, it will be overwritten. TECO - 255 - * ERCDR: (§) EWPTP: Select the card reader for input and the paper tape punch for * output. *ERMTAL: (§) EMI4EMI4EMEZDTAS: PROFIT,CBL This command string selects the tape on magnetic tape drive 1 for input, then positions the tape at the beginning of the third fii)e on that tape, and finally zeros the directory of the DECtape on drive 5 and opens an output file named PROFIT.CBL on it. *ERPULSE.F4[]1,141] Select the file PULSE.F4 in project~programmer area [11,14] on the disk for input. If this file * is read-protected against the current user, an error message results, * EZMTA3: * Rewind the magnetic tape on drive 3 and select it for output. . JERMIAT: (§) BEMEWMTAT: To position a magnetic tape for output (other than just a rewind), the user must first select the tape for input, then use EM commands to position the tape, and finally select the tape for output. In this example, the 8EM command positions the tape at the end of data that had previously been written on the tape. This enables new output to the tape without overwriting any of the previous . data. * EB22.F4 This command selects the disk file 22.F4 for editing. When the editing is completed, the file 22.F4 is the new version. The old version is changed to the backup file 22,BAK, and any previous backup file 22, BAK _is deleted. . * n<14EM> - | Advance magnetic tape n files. ‘ *EBCHESS. MACI1, 4] : This command opens the file CHESS. MAC on the [1, 4] disk area for inpuf, and opens a file CHESS.MAC on the user's own disk area for output (assuming the user's project-programmer number is not [1,4]). 3.3 INPUT COMMANDS Input commands are used to read data from the input file, which must previously have been opened, into the editing buffer. Input commands can be used only after an ER command (or the.equivalent) TECO - 256 - has been given. Input always begins at the beginning of the selected input file. Successive input commands then read successive segments of data from the input file. The amount of data read on an input command depends on the buffer size, the particular input command used, and the data itself, as explained in the paragraphs below. 3.3.1 Y Command The Y (yank) command first clears the editing buffer and then reads text into the buffer until one of the following conditions is met: a. The end of the input file is reached; b. A form feed character is read; c. the buffer is two=thirds full and a line feed is read (or filled to within 128 characters of capacity); d. the buffer is completely filled. The usual effect of the Y command is to clear the editing buffer and then read the next page of the input file info it. Less than the entire next page is read in only if that page is too large to fit within two-thirds of the buffer's capacity. If the cleared buffer is not large enough to accommodate at least 3000 characters, TECO automatically expands its buffer by 1K, if possible, before beginning to input. The user is notified of the buffer expansion by a message of the form [nK CORE], where n is the new number of 1K segments of (low) core allocated to the user. If the end of the input file has previously been read, the Y command only clears the buffer. If a form feed is read (i.e., if input stops because of condition b), the form feed flag ( @) is set to =1. The form feed itself is not packed in the buffer with the rest of the text. command begins input at the character following the form feed. A succeeding input If a form feed is not read, the form feed flag is set to 0, and the next input command begins input at the character following the last character previously read in. The form feed flag may be tested by the user (see Section 3.16), but ordinarily this is not necessary. A single Y command is automatically executed by the TECO filnam.ext initialization command causing the first page of the input file to be read into the buffer before TECO prints the first asterisk. The Y command sets the buffer pointer to the position preceding the first character in the buffer. The Y command does not accept a numeric argument. |f multiple Y commands are desired, n<Y > (where n is the number of pages to be ignored) can be typed. 3-10 - 257 - 3.3.2 : TECO A Command The A (append) command reads in the next page of the input file without clearing the current contents of the editing buffer. The new input data is appended to that which is already in the buffer (at the end of that data). The position of the buffer pointer is not changed. If there was a form feed char - acter in the input file separating the data already in the buffer and the data read in, it is removed. Thus, the A command can be used to combine several pages of a file. If the editing buffer does not have sufficient space to accommodate 3000 more characters, TECO automatically expands its buffer by 1K, if possible, and then completes execution of the A command. The user is notified of the buffer expansion by a message of the form [nK CORE]. Input begun by an A command is terminated by any of the same four conditions that terminate a Y command. The A command processes form feeds and the form feed flags in the same manner as the Y command. The A command does not accept a numeric argument. If multiple appends are desired, the user can type n<A> where n is the number of pages to be appended to the buffer. Note that nA is a different command (refer to Paragraph 3.16). If the end of the input file was previously read, the A command has no effect. 3.3.3 Examples of the Use of Input Commands *ERREPORT.CBL (3) Y % :YA * @ . . This deletes the page of text currently in the editing buffer, reads in the next two pages of the current input ) file, appending the second page to the first. *A ' This inputs the next page of the file, appending it to the [3K CORE] data already in the buffer. The previous contents of the buffer are not altered and the pointer is not moved. . - This command string opens the disk file REPORT,CBL for input and reads in the first page of that file. , . The buffer is expanded automatically, as required by the A command. In most cases, this message is of no concern to the user. It is important only if the system is nearly : overloaded. *ERDTA6:DATA.DOC e YYY - 3.4 <$) ' This command string reads in and discards the first two pages of the DECtape file DATA.DOC, and then reads in the third page of that file. SPECIAL CHARACTERS AS BUFFER POSITION NUMERIC ARGUMENTS In many cases, numeric arguments are used to specify buffer positions. Because such arguments tend to be large and not easily determined by counting, the buffer positions commonly used as arguments are represented by special characters. These special characters are shown in Table 3-2. TECO - 258 - Table 3-2 Special Buffer Position Arguments Character Value B Equivalent to 0. It represents the position af the beginning of the buffer, i.e., preceding the first character in the buffer. Z Equals the total number of characters in the buffer. Thus, Z represents the position at the end of the buffer, immediately aofter the last character in the buffer. . (period) Equals the number of characters to the left of the current position of the buffer pointer, and hence represents the buffer pointer position itself. H Equivalent to the numeric argument pair B, Z. Thus, in those commands that take fwo numeric buffer position arguments, H represents the whole of the buffer. This letter is particularly useful with type=out and output commands. The characters B, Z and . can be used in arithmetic expressions. 3.5 BUFFER POINTER POSITIONING COMMANDS This section describes the most elementary commands for moving the buffer pointer. In addition to these elementary commands, the search commands make up an entire set of powerful pointer= positioning commands. 3.5.1 The search commands are described in Section 3.11. J Command The nJ command moves the buffer pointer to the position immediately after the nth character in the buffer. The command OJ moves the pointer to the beginning of the buffer, i.e., to the position im= mediately preceding the first character in the buffer. The command J, not preceded by an argument, is equivalent to 0J. 3.5.2 I C Command If n> 0, nC moves the pointer forward over n characters in the buffer. If backward over n characters. The command C is equivalent The nC command is equivalent to . +nJ. n<0, nC moves the pointer to 1C; —C is equivalent to =1C. 3.5.3 R Command The R command is equivalent to ~C. l - The nR command is equivalent to -nC. pointer backward over n characters in the buffer. [If n >0, nR moves the If n <0, nR moves the pointer forward over n 3-12 - 259 - characters. The nR command is equivalent to .-nJ. TECO The command R is equivalent to 1R; ~R is equivalent to -1R. 3.5.4 L Command The L command is used to move the buffer pointer over entire lines. various arguments is shown in Table 3-3. The use of the L command with * Table 3-3 L Commands Command Argument L_ 1 assumed nlL n>0 oL 0 -L =1 assumed Moves the pointer back to the beginning of the line preceding the current line. nlL n <0 Moves the pointer back to the beginning of the nth line preceding the current line. Function - Advances the pointer to the beginning of the line following the current line. Advances the pointer to the beginning of the nth line following the current line. Moves the pointer back to the beginnin . of the current line. ‘ If the user attempts to move the buffer pointer backward beyond the position immediately pl;ior to the first character in the buffer, or forward beyond the position immediately after the last character in the buffer with a C, R, or J command, an error message is printed, and the poinfer is not moved from the position it had before the illegal command was given. With the L command no such error message results, but the pointer will be moved beyond the boundary of the buffer. 3.5.5 Examples of the Use of Buffer Pointer Positioning Commands 3L * *Z)-2L % *L4C The J command moves the pointer to the beginning of the first line in the buffer. The 3L command then moves it to the beginning of the fourth line. The ZJ command moves the pointer to the end of the last line in the buffer. Then the -2L command moves the pointer to the beginning of the next to last line in the buffer (assuming that the last line is terminated by a line feed). Advance the pointer to the position following the fourth character in the next line. TECO - 260 - *0L2R * — The OL command moves the pointer back to the beginning of the current line. Then the 2R command moves it back past the last two characters in the preceding line (the second of which must be a line terminator). *J-L @ The J command moves the pointer to the beginning of the buffer, and the -L command then has no effect and therefore does not return an error message . *ZJC The ZJ command moves the pointer to the end of the buffer, and the C command then causes the . error message. ?POP 3.6 3.6.1 Attempt to move pointer off the page with the C command. TEXT TYPE-OUT COMMANDS T Command Any part of the text in the editing buffer can be typed out for examination. using the T commands. argument(s) given. This is accomplished by The text typed out depends on the position of the buffer pointer and the The T commands never move the buffer pointer. When used with a single numeric argument, T is a line-oriented type-out command; when used with a pair of numeric arguments, T is a character-oriented type -out command. The various T commands are described in Table 3-4. 3.6.2 ‘Commcmd During the execution of any T command, the user can stop the terminal output by typing the special monitor control -character . The @ command causes TECO to finish execution of the command string omitting all further type-outs. to the next command string. The effect of the command does not carry over (This command may only be typed as a control character. The combina- tion 1O (uparrow, O) does not have the same effect.) Occasionally the asterisk output by TECO when a command is finished is also suppressed by . If this occurs, the user can type TECO will respond with an asterisk if it is waiting for a command. Table 3-4 T Commands Command T Argument Function 1 assumed | Types out everything from the buffer pointer through the next line terminator. If the pointer is at the beginning of a line, T causes the entire line to be typed out. If the pointer is in the middle of a line, T causes that portion of the line following the pointer to be typed out. -261 - TECO Table 3-4 (Cont) T Commands TM Command Argument nT ' n>0 . Function Types out everything from the buffer pointer through the nth line terminator following it. If the pointer is at the beginning of a line, this command types out the next n lines (including the current line). ot 0 -T -1 assumed | Types out everything in the line preceding nT n<0 m,nT m<n erotnT n>0 Types the n characters immediately following n>0 Types the n characters immedidtely preceding H=B,Z Types out the entire contents of the buffer. .n,.T HT 3.6.3 Types out everything from the beginning of . the current line up to the pointer. This command is especially useful for determining the position of the buffer pointer. the current line, plus everything in the current line up to the pointer. | Types out everything in the n lines preceding the current line, plus everything in the current line up to the pointer. - Types the m+1st through the nth characters in the buffer, _ the buffer pointer. the buffer pointer. tL Command If a form feed character, @ or tL, is included in @ command string as a'command, ‘it causes a form feed to be printed on the terminal when TECO reaches that point in execution of the command string. This feature is useful for obtaining a clean printout of the text in the buffer. 3.6.4 nET Command In normal typeout mode, most control characters print in the up~-arrow form and altmodes print as dollar signs. For the benefit of users with special terminal equipment, this feature can be suppressed. The command 1ET (any nonzero argument has the same effect as 1) changes the typeout commands so that every ASCII character is delivered to the typeout device._literally, i.e., with its own octal mode. This is called literal type-out mode. When TECO is in literal type-out mode, it can be restored to normal type-out mode, i.e., with substitutions for control characters and altmodes, by using the command OET. The ET .command (with no argument) returns the value (0 or 1) of the current setting of the type-out mode switch. See Section 3.16 for an explanation of this command. - 262 - TECO 3.6.5 Case Flagging On Type-out TECO has three text type-out case-flagging modes: and (3) no case flagging. (1) lower case flagging, (2) upper case flagging, In lower case flagging mode, all characters in the range octal 140 to 177. are preceded by ' (apostrophe) when typed out. In upper case flagging mode charaéters in the range octal 100 to 137 are flagged with a preceding '. TECO is initially set for lower case flagging. The case flagging mode may be set as follows: nEU (n >0) sets the typeout mode to flag upper case characters, OEU sets the mode to lower case flagging (standard), nEU (n < 0) sets the mode to no flagging, EU (without argument) returns the value of the current case flagging mode. If TTY LC is on (i.e., the user's terminal handles lower case) or if the ET flag is on, no case flagging ever occurs regardless of the EU setting. 3.6.6 Examples of the User Text Typeout Commands The following examples assume the buffer contains the text shown at the right, with the buffer pointer positioned between the M and the N ABCDE) FGHIJD | !} KLMNO) | PQRST) ¢ UVWXY) | z)! Examples: OO NO = 3 NO PQRST UVWXY E3 21 (B G) KLM* Note that no carriage return=line feed exists between the beginning of the line the pointer is on and the pointer itself, therefore, none are typed. The second asterisk indicates that TECO is ready for the next command. -263- TECO This pair of commands causes the entire current line to be typed out without moving the pointer. E—zr ABCDE The six characters typed are NO)) {PQ, This pair of commands types out the entire current line and leaves the pointer at the beginning of this line. The user requests type—put of the whole buffer, but stops it with a ‘ immediately after the G is typed. This command string causes the entire contents of the buffer to be typed out, with a form feed printed before and after the text is printed. * . +OETHTIETHT(S SJETHIT XYZ * ki TECO M'A'N'U'A'L *IEUT "T'E'C'O 'MANUAL *-1eut B) TECO MANUAL * If the buffer contains the text X Y ZJ!, this command string causes it to be fyped out in both normal and literal modes, as shown. In the first line typed out, the control~A and altmode are typed in normal mode as up-arrow, A and dollar sign. In the second line, typed in literal mode, 'A and $ do not appear because they are delivered to the console device in their true values, which are nonprinting characters on most terminals. The appearance of apostrophes in the typed text indicates that '"anual'’ is lower case. 1EU changes TECO so that upper case characters are flagged. -1EU stops case flagging. - 264 - TECO 3.7 DELETION COMMANDS The K and D commands are used to delete characters from the editing buffer. The K command used with a single numeric argument is a line-oriented deletion command. The D command and the K command used with a pair of numeric arguments are character-oriented deletion commands. 3.7.1 K Command The various K commands are described in Table 3-5. Table 3-5 K Commands Command Argument K 1 assumed nK | n>0 OK 0 ~K -1 assumed nK n<0 ' Function Deletes everything from the buffer pointer through the next line terminator. If the pointer is af the beginning of a line, the K command causes the entire line to be deleted. If the pointer is in the middle of a line, the K command deletes only the portion of the line following the pointer (including the line terminator). Deletes everything from the buffer pointer through the nth line terminator following it. Deletes everything from the pointer back to the beginning of the current line. Deletes everything from the pointer back to the beginning of the line preceding the current line. Deletes everything from the pointer back to the beginning of the nth line preceding the current line. m,nK 3.7.2 m<n Deletes the m+1st through the nth characters in the buffer and positions the pointer at the point of deletion (that is, the pointer is set equal to m). D Command Using the D command, characters can be deleted individually and in short strings. The nD command, where n >0, deletes the n characters immediately following the buffer pointer. [f the argument n is omitted, n =1 is assumed. The command nD, where n X0, deletes the n characters immediately preceding the pointer; -D is equivalent to ~1D. At the conclusion of any K or D command, the buffer pointer is positioned between the characters that preceded and followed the deletion. TECO - 265 - 3.7.3 Examples of the Use of Deletion Commands The following examples assume that the beFer ABCDE ! contains the text shown at the right; the buffer FGHIJ DV pointer is positioned between the M and the N, KLM\NO D § PQRST ) o J! UVWXY ZJ! Examples: ¥ . and fourth lines to KLMRST){, *6D Deletes NO ) {PQ, changing the third ‘ Deletes M. fl **-5D . Deletes,) KLM, changi‘ng the second and third lines to FGHIJNO) |, *-2D2D . Deletes LMNO, changing the third line to K 4. | = I * | *-D . 9 **HK . ‘ Deletes everything in ’rhe-buffer, but does not delete the form feed marking the end *0,.K Deletes everything from A fhrouglj M. of the page (if there is one). * ;. , ZK Deletes everything from N through Z J . -’:K ($) ' * . Deletes NO.J| changing the third and fourth lines to KLMPQRST !, *0LK Deletes the entire third line. *® *L3K ' ‘ . *KD | ) : * ®O *OK * wog Deletes the last three lines (everything from P through Z ) ). Deletes NO) lP; changing the third and linesfo KLMQRSTy . fourth Deletes KLM, . . Deletes FGHIJ ) KLM. * 3.8 INSERTION COMMANDS The insertion commands are used fo insert characters into the editing buffer from the user's terminal. 3-19 TECO 3.8.1 - 266 - | Command The basic text insertion command is the | command used with the desired text as its argument. text argument is terminated by an altmode. The The general form is *ltext This command inserts the ASCII text string, ''text'', into the editing buffer just achead of the buffer pointer. After the inserfion; the buffer pointer is positioned immediately after the last inserted character. The altmode terminating the text argument is not inserted. The text to be inserted may contain any character except the special characters (see Table 2-1), but control characters must be treated specially (see Section 3.8.8). 3.8.2 Tab Command The tab command is equivalent to the | command, except that the tab command causes the tab itself as well as all the following text up to the altmode to be inserted. In other words, if the first charac- ter of a text string to be inserted by an | command is a tab, the | may be omitted. The general form of the tab command is Fjtext @ 3.8.3 @I Command The @l command is slightly more powerful than the | command. This command enables the user to insert single (but not double) altmode characters in addition to the characters that can be inserted with the | command. (To insert a double altmode, ‘the second altmode must be preceded by a The @I command is useful for inserting TECO command strings into the editing buffer. .) The general form is *@l/text/ In this form, '"text'! is the text string to be inserted. The text argument must be immediately delimited, both before and after by any single character which is not itself a part of the text to be inserted. this example, the delimiting character is the slash character. In Altmode is not required to terminate the text string; the second occurrence of the delimiting character terminates the text string. inserted immediately preceding the buffer pointer, as it is with the | command. The text is The delimiting charac~ ter is not inserted. 3.8.4 nICommqnd Any ASCII character can be inserted into the buffer using the nI command. This includes all characters that the | and @I commands cannot insert. character ot a time. The command nl However, the nl command inserts only one inserts the character with the ASCII value n (decimal) into the buffer immediately preceding the pointer. 3-20 TECO § =267 - Unless the EO value has been set to 1, the nl command must be followed by an altmode (refer to Paragraph 3.17 for a description of the EO value). 3.8.5 n\Commqnd The n\command is used fo insert the ASCII representation of a decimal number n into the buffer. For example, 349\inserts the ASCII characters 3, 4 and 9 into the buffer immediately preceding the pointer. Note that n does not have to be a number typed in by the user. by some other TECO command. It can be a value returned Note that the n\command always inserts the decimal representation of n. 3.8.6 Examples of the Use of Insertion Commands The following examples assume that the buffer contains ABCD/\EF) { with the pointer positioned between D and E. *IXYZ . Produces ABCDXYZ,EF.) ¢ * ) Produces ABCD ) ! AL * f_l $o Produces ABCD ! E3R| — @ 4Cl |_| @ Produces A._‘_.BCDEUF) ! ;-"XYZ Produces ABCD "IXYZ/\EF) { E@I#IASA . pwH# *t0331 (3) =101 10l Produces ABCDIA *Produces ABCD($)EF) | Produces ABCDi’/ * *Z \ | | ;Z\Z\Z\ * @ * *121 * - 6 SA ' PV\//\EF) \ AEFD Prc;duces ABCD8/\EF) | because Z has the value 8. N Produces ABCD8910AEF ) ¢ because Z successively returns the values 8, 9, and 10, This command is used to separate the page ’ in the editing buffer into two pages. Both pages, however, remain in the editing buffer. ’ This is equivalent to the command in preceding example. It is convenient because it avoids the form feed echo. 3-21 TECO - 268 - *JILINE ONE) This example shows insertion of several HEE ;IYiVR?E‘é) Note that line feeds are inserted automati~ . lines of text ot the beginning of the buffer. " cally as the user types the carriage returns. OO *KI1D This command string is used to delete the @ : 2 tail of a line without rer oving the carriage return-line feed at the end of the line. - ' If the buffer contains ) | AB,CD EFGH) ¢ this command produces AB ) ! NEFGH ) * il RO ' This is used to insert a carriage return without a line feed following it. The single rubout deletes the line feed but not the carriage return. (See Section 5.1 for an explanation of rubout.) A7 *@%TEXT () x %(@) () * This is a convenient method for inserting multiple altmodes when using the @I command. The sequence x , where "'x'' is any character except altmode, is typed between the successive altmodes. *t0777 \ 3.8.7 This is used to insert the ASCII characters 511 ot the current pointer position. Case Control with Insert Commands With the I, @I, and tab insert commands TECO ordinarily inserts text in the same case in which it appears in the command string. The user may, however, alter the case of text being inserted by use of the special case control commands described in this section. 3.8.7.1 Alphabetic Case Control - The features described in this section provide the method by which alphabetic characters in the upper case range can be converted to the equivalent characters in the lower case range, and vice-versa. Alphabetic case conversion is done by use of two control- character commands, @ is used for translation to lower case, @ is used for translation to upper case. These two commands may be used within insert text arguments to cause case conversion on a temporary basis for that text argument, or as independent commands to cause case conversion in all insert and search text arguments. Note that @ and @ affect only alphabetic characters. They have no effect on non-alphabetic characters. 3-22 - 269 - TECO @ @ and @ @ used within text crgumenfs. (1) When used inside an insert text argument, two successive @ or @ commands cause translation, to the specified case, of all following alphabetic characters in that text argument. Example: “F @) or users oF @) @ TEco. (BE) The dbove command inserts ''For users of TECO."' with the initial "'"F" and ""TECO" capitalized, and all the other letters in lower case. (2) Single @ and @ used within text arguments. When used inside an insert text argument, a single @ or @ command causes franslation of the next single character (if it is alphabetic) to the specified case. The single @ or in a text argument takes precedence over the case conversion mode defined by double @ or @ commands. Example: ' *l (V) (Y user (WPROGRAM(E) The above command causes the string ''user Program'* with the ""P'"' in upper case, and all the other letters in lower case to be inserted. Independent @ and @ Commands. As explained above, when @ “and @ commands are used inside a text argument, they offect only that particular text string. When used as inde- pendent commands, however, @ and @ set TECO to a prevailing case conversion mode that affects all insert and search text arguments (except as specified by @ and @ commands within the text arguments). The independent command E\b or tV (or n @ . where n does not equal 0) sets the prevailing case conversion mode so that all upper case aiphabetic characters in insert and search text arguments are translated to lower case, except where @ commands within individual text arguments override the independent @ . Example: *tv§$ * W) FOR USERs OF (W) W) TECO.(B)E) *|[EXAMPLE The above commands cause ''For users of TECO."* and ""example'' to be inserted with all letters lower case except the "'F'' and ''"TECO"'. Likewise, the inde- pendent command @ or W (or n @ , where n does not equal 0) sets the prevailing case conversion mode so that all lower case alphabetic characters 3-23 - 270 - TECO in insert and search text arguments are translated to upper case, except where @ commands within individual text arguments override the independent @ . The independent @ command has the use explained above, obviously, only when the user TTY has lower case capability and TTY LC is on. Otherwise the @ command serves merely to turn off the @ command. 4 0@V ando W The independent O @ and 0 @ commands both have the same effect, namely, to restore TECO to the default condition where neither case of alphabetic char- acters are translated to the opposite case, except by @ and ‘ commands within text arguments. TECO is initially set for no prevailing case conversion. Note that the prevailing case conversion mode can have one, and only one, setting at any one time. The possible settings are: convert upper case to lower case STV§ convert lower case to upper case 0 @ or 0 @ no prevailing conversion When any of these prevailing modes is put into effect, it cancels any of the others that were in effect. The order of precedence of the case conversion commands is as follows: Highest: Next: single @ and @ inside text double @ and @ inside text Lowest: independent @ and NOTE If the EO value has been set to 1, @ and have no special effect when used inside text arguments{refer to Paragraph 3.17 for a description of the EO value). 3.8.7.2 Special ""Lower Case'' Characters =~ When used inside an insert text argument, the control command @ causes the immediately following character (if it is one of the special characters @, [\, 1, t, or+) to be converted to the equivalent character in the lower case ASCll range (i.e., octal 140 or octal 173-177). That is, ' (D@ becomes @ Cbecomes | ASCII 140 ASCII 173 @ \becomes | ASCIl 174 (F) 1 becomes } ASCII 175 m t becomes m <+ becomes ASCII 176 ASCIl 177 @ has no special effect within text arguments if the EO value has been set to 1. 3-24 - 271 - TECO Examples: *1vI (W) EXAMPLES FOR THE Inserts '*Examples for the ) W TEco M (W) GW) ANUAL. | TECO Manual. ' © *0 tVIEXAMPLE 1. EXAMPLE 1. nl Command. ' . @) N1 c@) @) omMMAND. ®® * *1 @ @(’ 3.8.8 - Inserts a right brace ({) Inserting Control Characters * As of version 22 of TECO all of the control characters ‘ - @ , @ - @ , and @ , @ , @ , and @ have been reserved as inside “text~commahds (some as yet undefined). In order to insert these characters, the user must employ either the or @ command. when used inside an insert text argument causes the next single character to be interpreted as . text rather than as a command, and accordingly to be inserted in the buffer. control characters including o (©, ©, itself. (W, o rUBOUT.) This applies to all It also applies to Altmode. (It does not, however, apply @ when used inside an insert text argument causes all succeeding instances of the o’bove mentioned control characters except and @ itself to be interpreted as text rather than as commands. @ “does not affect altmodes. A second instance of @ in fhe same text argument nullifies the effect of the first. If the EO value has been set to 1, and @ haveino special effect when used inside text arguments, and all control characters can be inserted with no special treatment (refer to Paragraph 3.17 for a description of the EO value). NOTE The clever way to create a TECO macro is simply to type the macro as a long command string just as if it were to be executed immediately, but instead of typing at the end, type @ @ Then type *i to place the command string in Q-register i. (This stores the macro, ready for execution, in Q-register i. (Refer to Paragraph 3.14.3 for the description of the *i command.) I * | % Examples: TEXT Inserts the text " 3=25 TEXT - 272 - TECO Inserts ""NSTRING (§)"". *INSTRING (IR) * Inserts ' (fA) SEARCH EI (D(EA) SEARCH © O OO IE @@XAME! | 3.9 OO IExample!". | TEXT TEXT OUTPUT COMMANDS Output commands are used to transfer data from the editing buffer to the output file. 3.2.1 PW Command The PW command is the basic output command. It does nothing but output. Depending on the argument used with it, the PW command outputs all or any part of the data in the editing buffer. It does not, however, delete any data from the buffer, and it never moves the buffer pointer. The PW command outputs the entire contents of the buffer and always appends a form feed to it, The nPW command (n >0) outputs n copies of the text in the buffer, appending a form feed to each copy. 3.9.2 P Command The P command is a combination command; when used with a single numeric argument (or no argument), the P command does both output and input. The various functions of the P command are described in Table 3-6. Note that the P command (with a single argument) always clears the editing buffer before it inputs it leaves the pointer at the beginning of the new page. If a P command is exe=the next page, and cuted ofter the end of the input file has already been reached or when there is no input file, the buffer is simply cleared. No data is read in. Unlike the PW command, the P command does not always cause a form feed to be output at the end of the data output from the editing buffer. The P command outputs a form feed at the end of the data only if a form feed was encountered to terminate the last input command. 3-26 - 273 - TECO Table 3-6 P Commands Command P : - Argument Function 1 assumed Similar to PWY. Outputs the entire contents of the buffer, then clears the buffer and reads in the next page of input. The buffer pointer is left at the beginning of the page that is read in. If there is no input file, or no more data in the input file, the buffer is left cleared. A form feed character is appended to the end of the data that is output only if the last input command was terminated by a form feed. nP n>0 Executes the P command n times. This com= mand can be used fo skip over several pages of text when no editing is required. The nP command causes the n pages of the input file, starting with the page currently in the editing buffer, to be output, and then the nth page ofter the current page to be yanked in. m,nP m<n When used with a pair of numeric arguments, the P command does output only; it does not ~ clear any data from the buffer, it does not input any more data, and it does not move the buffer pointer. Also, the m,nP command never causes a form feed to be appended to output'. The only action of m,nP is to output the m+1st through the nth characters in the buffer. (m,nP and m,nPW are equivalent.) HP H=8B,Z Outputs the entire contents of the buffer without appending a form feed to it; the buffer is not cleared, and no new data is read in. HPW are equivalent.) (HP and ]However, if a form feed character has been inserted in the buffer between the mth and nth characters, it will be output. The PW command does not clear the buffer and does not move the buffer pointer. The same is true of a P command used with two arguments. Note also that when a PW command is used, a form feed character is always automatically sent to the output file immediately following the data from the buffer. (Recall that when the page was read into the buffer, the form feed character that terminated it, if any, was discarded and not read into the buffer.) The form feed character is appended to the outgoing data regardless of whether or not a form feed character was encountered when the data was read in, i.e., regardless of the setting of the form feed flag. This is not true of the P command. NOTE If the EO value has been set to 1, the P command behaves like the PW command with regard to form feeds. 3-27 - 274 - TECO When a P or PW command is used with a double numeric argument (including an H argument), a form feed character is never appended to the output data. This is true regardless of whether or not a form feed character was encountered when the data was read in. NOTE The discussion in this section does not apply to the form feed characters that the user hgs inserted intothe editing buffer using 12| or | @) commands. Form feed characters in the buffer are output exactly as other characters in the buffer. If the editing buffer is empty when a P or PW command is executed, no output of any kind takes place. No form feed character is output. If the user wants to create a blank page, an example of the procedure is shown below. As shown in the discussion above, the nP command can be used to skip over several pages to get to the next page where editing is required. The nP command can also be used with a very large argument, e.g., 10000, in order to skip to the end of the input file without doing any more editing. The N and EX commands are other commands which can be used for this purpose. 3.9.3 EF Command The EF command is the output file closing command. The EF command, or an equivalent command, must be used to close the output file after all output to it is complete. used after the P command which outputs the last page of a file. EG (see Section 3.10) automatically cause an EF to be executed. The EF command is normally The special exit commands EX and Also, a new EW command causes an EF to be executed on the previous output file, if any, before opening the new output file. Note that if an EF command is executed in the middle of the file, all sicceeding pages of that file are lost. 3.9.4 Examples of the Use of Output Commands *PT FIRST LINE OF NEXT PAGE Output the current page, clear the buffer, read in the next page, then type out the first line of the new page. *PEF Output the current page to the output file, and * then close the output file. - is used to close a file (after writing the last page) This command string when it is not desirable to exit from TECO. *PWEF ' Equivalent to the preceding example, except that the buffer is not altered. 3-28 - 275 ~ TECO This command string outputs the enfire contents of the buffer, but it rearranges the data as it is oufput. The part of the page that follows the buffer pointer is output first by the ., ZP command. Then that part of the data which precedes the pointer is output by the 0,.P command. No form feed charac- | % | * .,ZP0,.P o ter is appended to either section of the output. This performs the same function as the preceding | % | * ., ZP12| 6 0,.P *HK 121 command string except that it does append a form feed character to that part of the page that is output last. HP This command string produces a single blank page. * ’ *HK12i . PW This produces two successive blank pages. * - *8p | * - If page 6 of a file is in the editing buffer, this command causes pages 6 through 13 of the file to be output one ofter the other, and then reads in page 14. *300 P This outputs 300 copies of the current page. * *PWJKIJ.DOE PW This outputs the current buffer, the modifies the first line and outputs the buffer again. . MAKE FILE This is the usual method for creating a text file. Flpage of text *P12nd page of text *Pllast page of text 3.10 EX EXIT COMMANDS Exit commands are used to terminate a TECO job and return to the monitor. mands: EX, EG, 3.10.1 There are four exit com- @ , and @ . EX Command The EX command is used to bring an editing job to a satisfactory conclusion with a minimum of effort. Its use is shown in the example below. The user is editing a 30-page file and that the last actual change to the file is made on page 10. this point the user gives the command: *EX EXIT 1C 3-29 At TECO ' - 276 - In this case, the action performed by TECO is equivalent to the command string 21 PEF, with an automatic exit to the monitor at the end. Thus, the action of TECO is (1) to rapidly move all the rest of the input file, including the page currently in the buffer, on to the output file; (2) to close the out= put file; and (3) to return control to the monitor. The EX command is the easiest method of finishing an editing job, with the latter part of the input file being properly output and the output file closed. The EX command performs both input and output functions. The EX command causes a form feed character to be output ofter the output of the buffer, only if a form feed was encountered when that buffer of text was read in. In this way, the EX command main- tains existing page sizes. 3.10.2 EG Command The EG command first performs exactly the same functions as the EX command, and then causes the last compile=-class command (COMPILE, EXECUTE, LOAD, or DEBUG) attempted before TECO was called, to be re-executed (with the same arguments). Generally, the EG command is used only to exit from an editing job that was initialized by an EB command or a TECO filnam.ext command. As an example;, suppose the user gives the command .COMPILE PLOT.F4) to request compilation of a FORTRAN source program, but the compiler encounters errors in the code. The user then calls TECO to correct these errors with the command: L3 .TECO PLOT.F4) When all the errors are edited, the user exits from TECO with the command OO® - This command causes (1) the rest of the file PLOT.F4 to be output and closed, and (2) the command COMPILE PLOT.F4 to be re-executed automatically. 3.10.3 @and q@ Commands The @ and @ commands do not perform any input or output. They are used strictly for exiting to the monitor. The command @ (or 1Z) is the simple exit command that can be entered into command strings. |t allows any /O commands that have already been given to be completed, then closes the output file, and then returns the user to the monitor. 3-30 - 277 - TECO Example: Vd *PWEF The @ is executed as a régulor command EXIT in the.command string when its turn comes. tC . NOTE If the EO value has been set to 1 (refer to Paragraph 3.17.3), a single @ is equivalent to @ . The @ command is a monitor command that is used to imhediately exit to the monitor. The @ command can be typed at any time, while typing a command string or while a command string is being executed, and it will override everything else. It cannot be entered in the up-arrow, C form. If there are any input/output functions in progress when @ is typed, a single @ will allow them to be completed before exiting to the monitor. Double @ ( @ @ ) interrupts everything, even I/O in progress, and exits to the monitor immediately.. The command does not cause the output file to be closed. Both @ and @ are abortive exit commands. However, when they are used, it is possible to return to the TECO job provided no other program has been called into core over the TECO job. Simple monitor commands such as ASSIGN, or PJOB, can.be executed without damaging the TECO job. After an exit to monitor level, even if the exit was caused not by a user @ , or @ , but instead by some problem detected by the monitor itself, the user can return to his TECO job by using either the CONTINUE or the REENTER command. The command CONT causes TECO to begin operations exactly where it left off. Even /O can be interrupted and then continued. Example: *ERPTR: : EWLPT: DEVICE LPT OK? .CONT) Y3P Here the monitor causes an exit to monitor level because of a device ) problem. After the user corrects the problem, he continues the job and the * - current command string executes to - completion, REENTER causes the TECO job to be reentered with the contents of the editing buffer (when the exit occurred) intact. After reentry by a REENTER, TECO reinitializes itself for a new command string. Any previous commands still unexecuted at the time of the exit are lost. If a command string was being executed when the exit occurred, the part of the string that was not executed before the exit will 3-31 TECO - 278 - not be executed aofter the REENTER command. string was executed. The user must determine how much of the command If 1/O is interrupted, some portion of the input or output files is frequently either lost or duplicated. Examples: *ICOMME @ Before finishing a command string the .DEASSIGN LPT D .DAYTIME J T4-APR-70 -REE) user exits to perform a monitor command. 10:34 He then reenters TECO. The command * sHllgi]nchl’. Y *<sF00 (§) oL > This is an in@ife oop (if FOO is in the ZICOMMENTS ~ string must be retyped, but the buffer buffer). @ @ P . . e stops execution and returns the user to the monitor. .REEJD is REE re- starts TECO with the editing buffer intact * and the command buffer empty. -*50P C>($ _ ' done. Interrupting execution of anI/Q This is an example of what should not be command does not permit reentry, In this case, some of the output file will @ almost certainly be duplicated. _;FREE‘) The contents of any Q-registers (refer to Paragraph 2.8) remain intact after a @ , CONT or @' , REENTER command sequence. 3.11 SEARCH COMMANDS In many cases the simplest way to reposition the buffer pointer is by using a character string search. A search command causes TECO to scan through the text until a specified string of characters is found, and then to position the pointer at the end of this string. The string of characters to be searched for is supplied as a text argument with the search command. The search string can be from 1 to 36 character positions in length or up to 80 characters including atl control commands. If an exact match for the search string is found in the text, the buffer pointer is positioned immediately after the last character in this match. If the string is not found, TECO positions the pointer at the beginning of the buffer and notifies the user of the failure. The failure notice may take one of two forms, depending on the type of search command used. For further explanation see the paragraph below. All searches begin at the current position of the buffer pointer. 3-32 - 279 - TECO If no text argument is provided with a search command, e.g., S r @N//, the search is executed using the last previous search command argument. 3.11.1 S Command The S Command is used to search for a character string within the current editing buffer. If the string is not.found between the current buffer pointer position and the end of the buffer, the search fails. After an unsuccessful S search, the buffer pointer-is reset to the beginning of the buffer, and, unless the : modifier (explained below) was used or the search is within an iteration (see Section 3.12), an error message is printed. The general form of the S command is *Sstring For the standard S command, the search string is provided as a normal alphanumeric argument following the S and terminated by an altmode. ''string'' can contain any character except the special charac- ters listed in Table 2-1, ' The S command may be used with a single numeric argument. nth occurrence of the specified search string. The command nS causes a search for the When n is omitted, n=1 is assumed. n must be greater than 0, 3.11.2 FS Command The FS command is used to search for a character string within the current editing buffer (function of the S command) and replace it with another string. If the string to be replaced is not found after the current buffer pointer position and before the end of the buffer, the search fails and no replacement is made, The general form of the FS command is *FSstring] string2 where string 1 is the string to be deleted and sfrith is the string to be inserted in its place. is omitted, string 1 is deleted without any string replacing it. If string 2 However, even when string2 is omitted, its terminating altmode must be present as shown in the form: *FSstring] 3.11.3 N Command The N command combines the S command with input/output functions. The N command is used to search for a character string in a page of the input file which may not yet have been read into the buffer. The N command has the same form as the S command. 3-33 - 280 - : TECO The N command functions exactly like the S command except that an N search does not terminate at the end of the page currently in the buffer. If no match for the search string is found between the current buffer poinfer position and the end of the buffer, the current page is output, the buffer is cleared, the next page is read in, and the search starts over at the beginning of the new page. This process continues until a match is found or the input file is exhausted. If an N search fails, the entire input file has been passed through the buffer and delivered to the output file, and the buffer cleared. The output file is not closed. Unless the : modifier was used or the search is within an iteration, an error message is typed to notify the user that the search has failed. An N search will not detect a match when the matching characters are split across two buffer loads. The output function of the N command is exactly like the P command and the EX command. If a form feed character was encountered when a given page was read in, a form feed character is appended to that page when it is output; otherwise, no form feed character is output. The N command can be used with a single numeric argument. the nth occurrence of the specified search string. The command nN causes a search for When n is omitted, n=1 is assumed. n must be greater than 0, 3.11.4 FN Command The FN command is used to search for a character string in a page of the input file which may not yet have been read into the buffer (function of the N command) and to replace it with another string. FN command operates like the N command when searching for the string. The If the search fails, no replacement occurs. The general form of the FN command is *FNstring] string?2 where stringl is the string to be deleted and string2 is the string to be inserted in its place. is omitted, stringl is deleted without any string replacing it. If string2 However, even when string2 is omitted, its terminating altmode must be present as shown in the form *FNstring] 3.11.5 Backarrow Command The backarrow command is identical to the N command except that a backarrow search generates no output. Generally, where the N command executes a P, the backarrow command executes a Y. backarrow search is used for examination functions and for discarding parts of a file. form of the backarrow command is Yestring 3-34 The general The - 281 - | ‘ The backarrow command can also be used with a single numeric argument. a search for the nth occurrence of the specified search string, TECO The command ne-causes When n is omitted, n=1 is assumed. n must be greater than 0. 3.11.6 Search Command Modifiers 3.11.6.1 @ Modifier - There are two search command modifiers. The @ modifier is used to alter the method which TECO reads the search command's text argument from the command string. general form of a @ search command is the same for S, FS, N, FN, and backarrow. *@nS/string/ The It is | The @ modifier is placed before the S, FS, N, FN, or backarrow, and before the numeric argument, if any. When the @ modifier is used, the search string argument is delimited, not by the search command and an altmode, but by the first character typed ofter the search command and the next re- currence of this character. In the example above, the delimiting character is a slagh. The delimiting character may be any character except a character that appears in the search string itself. @ modifier, single (but not double) altmodes can be used in the search string. With the The @ modifier can be used in an FS or FN command to separate the strings with a delimiting character other than altmode. This is useful in cases where a double altmode cannot terminate the command. A double altmode terminates an FS or FN.command when the replacement string is omitted to allow deletion of the string for which the search is made. Use of the @ search commands is similar to the use of the @I insert command (refer to quagraph 3.8.3). 3.11.6.2 Colon Modifier = The colon modifier is used to alter the execution of a search command in the event the search fails. Without the colon modifier, a search that fails causes an error message to be printed; if the colon modifier is used, no error message is printed. Instead, every colon search command executed returns a numeric value that can be printed out, stored in a by a conditional branch. Q-register, or tested A colon search command returns the value =1 if the search is successful, and the value 0 if the search fails. The general form of a colon search command is the same for S, FS, N, FN, and backarrow searches: *:inSstring _ The colon precedes the search command letter and its numeric argument, if any. Both the colon and @ modifiers may be used on a search command, in either order. The concept of a command returning a value is explained in Section 2.7.3. Just as the Z command takes on a value that may be used as a numeric argument, so also the command :Sstring fi takes on a value of 0 or -1 after it is executed. If this is the last command in a command string, or if the command following it does not take a numeric argument, the value returned by the colon search is discarded. Hence, a colon search should be followed by a command that takes a numeric argument. 3-35 TECO - 282 - The colon search commands reposition the buffer pointer in the same manner as other search commands, regardless of whether or not the returned value is used. The colon searches are used primarily in programmed editing and are usually followed by a conditional command. 3.11.7 Examples of the uses of colon searches are given in Sections 3.13 and 3.14. Automatic Typeout After Searches The ES command allows the user to specify automatic typeout of the line where a successful search has terminated. colon. The search cannot be in an iteration, nor can the search command be preceded by a When the FS or FN command is used, the typeout occurs after the insertion has taken place. The user can also specify in the ES command that either a line feed or a character be inserted into the typeout to indicate the position of the pointer. Unless the ES value is set, the default is that no automatic typeout after searches will be performed. ' L The user can set the ES value in the following manner: OES Restore TECO to the default of no automatic typeout. -1ES Set the ES value to cause automatic typeout of a line on which a successful search has terminated. nES(n >0) Set the ES value ton. Ifnisin the range 1 through 31, asingle line feed character is included in the typeout at the position of the pointer. If nis 32 or greater, the character with the ASCI| value specified by n is included in the typeout at the position of the pointer. ES 3.11.8 Examine the setting of the ES flag. Case Control in Searches When searching for alphabetic. characters TECO will normally accept either upper or lower case characters as a match. This is called ''either-case mode''. cute any or all searches in ""exact mode''. TECO may, however, be forced to exe- In exact mode TECO will accept an alphabetic character or a search match only if it has the same case as the corresponding character given 'by the user in the text argument, Before the techniques for match mode control can be explained, we must first explain the various techniques for case control. 3.11.8.1 Match mode control is explained in Section 3.11.8.4. Alphabetic Case Control in Search Arguments = The case of alphabetic characters in search text argument is controlled by the same set of commands used to control case in insert text arguments, 3-36 - 283 - TECO The features described in this section provide the method by which alphabetic characters in the upper case range can be converted to the equivalent characters in the lower case range, and vice-versa. Alphabetic case conversion is done by use of two control~character commands. @ is used for translation to lower case. @is used for translation to upper case. These two commands may be used within search text arguments'to cause case conversion on a temporary basis for that text argument, or as independent commands to cause case conversion in all insert and search text arguments. Note that @ and @ affect only alphabetic characters. They have no effect on non=alphabetic characters. (1) @ @ and @ @ used within text arguments. When used inside a search text argument, two successive @ or @ commands cause translation, to the specified case, of all following alphabetic characters in that text argument. ” Example: #SE @ @ OR USERS OF @ @ TECO. The above command searches for '*For users of TECO." with the initial ""F" and ""TECO' capitalized, and all the other letters in lower case. (2) Single @ and @ used within text arguments. When used inside a search text argument, a single @ or @ command causes translation of the next single character (if it is alphabetic) to the specified case. The single @ or @ in a text argument toke precedence over the case conversion mode defined by double @ or @ commands. Example: *s (V) (V) UsEr - @ PROGRAM The above command causes a search for the string ''user Program'' with the '' P! in upper case, and all the other letters in lower case. (3) Independent @ and @ commands. As explained above, when @ and @ commands are used inside a text argument, they affect only that particular text string. When used as independent commands, however, @ and @ set TECO to a prevailing case conversion mode that affects all insert and search text arguments (except as specified by @ and within the text arguments). 3-37 @ commands - 284 - TECO The independent command @ or tV(or n @ where n does not equal 0) sets the prevailing case conversion mode so that all upper case alphabetic characters in insert and search text arguments are translated to lower case, except where @ commands within individual text arguments override the independent @ Likewise, the independent command @ or tW (orn @, where n does not equal 0) sets the prevailing case conversion mode so that all lower case alpha- betic characters in insert and search text arguments are translated to upper case, except where @ commands within individual text arguments override the independent The independent @ command has the use explained above, obviously, only when the user TTY has lower case capability and TTY LC is on. Otherwise the @ command serves merely to turn off the @ command. (4) 0(V) and 0 @ The independent 0 @ and 0 @ commands both have the same effect, namely, to restore TECO to the default condition where neither case of alpha- betic characters are translated to the opposite case, except by @ and @ commands within text arguments. TECO is initially set for no prevailing case conversion. Note that the prevailing case conversion mode can have one, and only one, setting at any one time. The possible settings are: Vv convert upper case to lower case W convert lower case to upper case 0tV or 0tW no prevailing conversion When any of these prevailing modes is put into effect, it cancels any of the others that were in effect, The order of precedence of the case conversion commands is as follows: Highest: Next: Lowest: and @ inside text single and @ inside text double independent @ and @ NOTE If the EO Value has been set to 1 (refer to Paragraph 3.17.3), @ and @ have no special effect when encountered inside text arguments. 3-38 - 285 - 3.11.8.2 ‘ TECO Special ""Lower Case'' Characters - When used inside a search text argument, the control command @ causes the immediately following character (if it is one of the special characters @, [\, 1, t, or <) to be converted to the equivalent character in the lower case ASCII range (i.e., octal 140 or octal 173 to 177). @ has no special effect within text arguments if the EO value has been set to 1. Refer to F’aragrcph 3.8.7.2 for examples. 3.11.8.3 Control Characters in Search Arguments = As of version 22 of TECO all of the control characters - @ , @ - (Z), and ®, @ , @ , and @ have been reserved as inside-text-commands (some as yet undefined). must employ either the In order to search for these characters, the user or @ command, when used inside a search text argument causes the next single character to be interpreted as text rather than as a command. This applies to all control characters including applies to altmode. (It does not, however, apply to @ , itself. It also @ . @ , or RUBOUT.) @ when used inside a search text argument causes all succeeding instances of the above mentioned control characters except ’ and GD itself to be interpreted as text rather than as commands. @ does not affect altmodes. A second instance of in the same text argument nullifies the effect of the first. | If the EO value has been set to 1, and @ have no special effect when used inside text argu- ments, and all control characters (except the special characters) can be searched for with no special treatment. 3.11.8.4 Case Match Mode Control in Searches - Unless special action is taken all searches are executed in' 'either-case mode''. This means that regardless of the setting of the prevailing case mode by an independent @ or @ command, a search for an alphabetic character will accept either the corresponding upper or lower case character as a match. However, if @ or @ case control commands are used within a search text argument, it is assumed that the user desires an exact mode search, and a match will be accepted only for the corresponding characters in the exact case specified by the user. . \ If the user desires a search to be executed partly with eéxact mode and partly with either~case mode, he should bracket the characters to be taken in either case with @ characters. (The @ character is entered by simultaneously depressing the CTRL, SHIFT, and L keys.) For example, S @ @ ABC @ DEF @ will be successful only with strings containing lower case abc, but it will accept either upper or lower case def as a match for the last 3 characters. 3-39 TECO : - 286 - NOTE If EO=1, all searches are executed in exact mode and ® has no special effect in text arguments. The search mode can be forced to exact mode for all searches by use of the independent command n @, where n does not equal 0. 0 @ resets the search mode to 'either' mode. @wifhou’r an argument returns the value of the search mode flag. 3.11.9 Special Match Control Characters There are five special control characters that can be used in search character string arguments. These characters alter the usual character-matching process that goes on when a search is in progress. They actually reside in the search string and are interpreted by the search routine itself. The presence of a (X) command in a search string is a signal that this particular character position in the string is unimportant and that any character is to be accepted as a match for it. The command is a free variable in the search string. @ To find a match, some character must be present in the position occupied by the @ command; however, it does not matter what this character is. The @ command in a search string is a restricted variable. lts presence indicates that any separator character is to be accepted as a match in ifs position. A separator character in any character except a letter, a digit, a period, a dollar sign, or a percent sign; i.e., any character except a character that is commonly used in symbols. @ also accepts the beginning of the editing buffer as a match, The @ command is anofher restricted variable. It must be followed by a single character argument: @ x. The @commond signals that, in the position occupied by the @ and its argument, any character is to be accepted as a match excepf the argument. The command is used in a search string to indicate that the character following the is to be interpreted literally rather than as a command, even if this character is one of the special match control characters. The @ command has the same function as because @ will not allow insertion of as a text character while , but it is better to use will, The @ command when used with an argument in a search string indicates particular groups of characters to be accepted as a match. Depending on the argument, this command matches on the first occurrence of one of the following groups. @ A @ D L any alphabetic character. any digit. any end of line character (or end of buffer character in the absence of an end of line character). 3-40 - 287 - @S (‘) - TECO any string of spaces and/or tabs.. vV @w any lower case alphabetic character. g any upper case c;l.phabetic‘ character. @ <nnn> the ASCII character whose octal value is nnn. @ [q,b,c,..] - any one of the characters a,b,c,... (a,b,c,.. can be any symbols that represent single characters). Since the five commands @ , @ , @P , and @ are used in the middle of ASCII search strings, they cannot be entered in the up-arrow, character form allowable for some control character commands. 3.11.10 They must be typed as a single control character. Examples of the Use of Search Commands Examples: *SA —{B ' . This causes the pointer to be positioned im- . - *SNIX , ' mediately aofter the B, in the first occurrence of the string A —|B after the current position of the pointer. The string NIX is not found between the ' current pointer position and the end of the ?SRH CANNOT FIND "NIX" buffer. The error message is typed and the pointer moved to the beginning of the buffer. The user may have typed an incorrect search string, the pointer may have been positioned somewhere in the buffer after the N, or the string NIX may not have been read into the * current buffer. *NDIGITAL * - If page 5 of the text is currently in the buffer and the string DIGITAL does not occur until page 15, this command causes pages 5 through 14 to be output and page 15 to be read in. The pointer will be set immediately after the L. *NLAST LIN PG1 TST LIN PG2 . If this string actually exists in the file but the two lines are not read into the same : buffer load, the N search will fail. ?SRH CANNOT FIND "'LAST LIN PG1 1ST LIN PG 2 " % *12FSOF ($) FOR This command causes TECO to search the current buffer for the 12th occurrence of the string ""OF"" and replace it with the string "FOR', - 3-41 TECO - 288 - *5+VERSIONSS This command can be used to determine if the string VERSIONS8 occurs in the input file five times. If it does, the pointer is positioned immediately ofter the fifth occurrence, and everything in the input file, preceding the page on which the fifth occurrence is located, is discarded. *-1essworb () 8) 60 The ES value is set to =1 to cause the line where the search ended to be typed. This makes certain that the search has actually FORMAT ("WORD') b found the right occurrence of the string. It is easy to overlook an occurrence of a string preceding the one which the user desires. *sFSINTEREST (3) () This command causes TECO to search the current page for the fifth occurrence of the string ''INTEREST"" and delete it. Two ‘ ‘s must be present following the string to be deleted; the first delimits the string to be searched for and the second tells TECO that there is no replacement string. An N search should not be used where an S search would suffice, because user errors with the N command, such as the spelling error shown here, can cause considerable delay. In this example, the user's error caused him to have to pass over the entire file twice *NMASSACHUSETS 2SRH CANNOT FIND **MASSACHUSETS EF *EBOUTPUT.FIL (3) Y instead of just once. *NMASSACHUSETTS The command @ 35 + * £@3s+ + searches for the third occurrence of the altmode character following the buffer pointer. When this alt- +IEF mode is found, the characters EF are inserted immediately ofter it. The plus characters serve as the delimiters for the one=character search string ($). The plus characters are not part of the search string. *@FN/WRITE#/PRINT#/ This command causes TECO to search for the string ""WRITE#"* and replace it with the string "' PRINT#,"* Each page of the text is M @e®c 0 @BO ® G searched until the string is found. Any of the following three strings of characters would serve as a match for this N search: A6B~C?D J AR~ _p ® AAB,C (§) D None of the following four strings would serve as a match: AJB C-D3 A.B.C.D. AABBCCD AxB_CAX (1D 3-42 (¥ - 289 "~ - TECO *IESSFOUR FOUR — ' SCORE AND SEVEN YEARS AGO Because the ES value was set to 1, automatic typeout of the line occurs aofter the string * ""FOUR"' was found. A line feed was inserted at the pointer position in the line to allow the user to easily locate the pointer. *1ESFSI/O 1-O This command string causes TECO to search for the string ''1/O" on the current page and -O —CONTROL = — : 3.12 ITERATION COMMANDS 3.12.1 Angle Bracket (<...>) replace it with the string ''1-O''. The line is then typed with a line feed at the position of the pointer. The user can cause a group of command to be iterated (repeatedly executed) any number of times by placing these commands within angle brackets. The left angle bracket marks the beginning of a command string loop and the right angle bracket marks the end of the loop. These command string - loops can be nested in the same manner as arithmetic expressions are nested within parentheses. Loops should be nested to no/more than approximately 20 levels; otherwise, pushdown list overflow may occur. A numeric argument can be used to specify the number of times a given loop is executed. The argument is placed before the left angle bracket in the form n<...>. This causes the group of commands within the brackets to be iterated n times. In a command of the form n <...>, if the argument n is less than or equal to zero, the commands contained within the angle brackets are skipped. If no argument is given, the number of iterations is assumed to be infinite ( Example: *J8< "I L> * - This command string inserts 5 1"ab at the beginning of the first eight lines in the buffer and leaves the pointer positioned at the beginning of the ninth line. The J command starts the pointer off at the beginning of the first line. The first com- . mand in the loop, inserts a tab. Then the next command, L, moves the pointer to the next line to prepare for the next iteration of the loop. 3.12.2 Semicolon Command Iteration of a command string loop can be terminated before the iteration count is satisfied by using the conditional iteration exit command, semicolon. angle brackets. The semicolon command can be used only within It can be used with or without a numeric argument. When used without a numeric argument, the semicolon command evaluates the outcome of the last search (of any kind) that was executed before the semicolon command was encountered. If this search was successful, command execution continues within the loop, as if no semicolon were present. If, however, the most recent search failed, the semicolon command causes all those commands that follow 3-43 TECO - 290 - the semicolon in the loop to be skipped over, and command execution to pass on to the first command following the right angle bracket which closes the innermost loop that the semicolon is in. NOTE Within a command loop, all searches are colon searches. They do not generate error messages when a failure occurs, instead they return a value of -1 if successful and O if unsuccessful . The semicolon command can also be used with a numeric argument. n<0. The command n; is ignored if However, if n>0, the command n; causes command execution to exit from the loop just as the semicolon command exits from the loop when a search fails. Examples: I *J<OLIJAN 9 FS1969 JAN REPOR DEPT: JAN 1970 70 ;>HT . JAN 1970 SALES WHOLESALE: RETAIL: EXPENSES: JAN 1970 COMMIISSIONS: RETURNS: | I J /! This command string inserts JAN at the beginning of the first line in the buffer and at the beginning of each line that contains the string 1970, It also changes the 69 in every occurrence of 1969 to 70. The action is as follows: The J command starts the operation at the beginning of the buffer. The first execution of the OL does nothing. SI;/\E/ES'FI?PNG [JAN then inserts JAN at the beginning of the first line. Now, a search is made for 1969. When 1969 is found, VENTORY: FS1969 . 70 * 69 to 70. changes the This completes the first itera- tion; execution loops back to the <. OL moves the pointfer to the beginning of the line where the 1969 was found. Here JAN is inserted and then a search is begun for the next 1969. This continues until the search command fails to find another 1969. When the search fails, the pointer is moved to the beginning of the buffer. HT is the next command which is executed. (It is assumed that no line contains more than one ''1969.'") *< 51969 I T6K CORE T7K CORE] [8K CORE] ;oLIDEC ()> This command puts TECO into an infinite loop because the OL causes the search com= mand to keep finding the same 1969 over and over again. If left to run long enough the lDECcommand will eventually @ @ LREE) * exhaust available core and stop execution. In this example, the user has stopped the - loop with @ @ , and then REEntered. 3-44 - 291 - *Y<NEXAMPLES: ;<S) ' -" L >> ‘ * TECO This i7 an example of nested loops. The : main - loop searches for pages in a file that contain tTwe heading EXF;\I\QAPLES:. When this is found, execution enters the secondary loop, which inserts a tab at the beginning of all the succeeding lines on that page (i.e., after every )i on that pages). When the second semicolon causes an exit from the inner loop, execution loops back to the N search. Finally, when the N search fails, execution is completed. *EBfilnam.ext @ 50000<YHP>EX @ ' : *< FSREAD This example shows how to remove all form feeds from a file. WRITE . ;> : This command causes a search of the current page for all occurrences of the string _ - ""READ"' and replacement of them with the _ string ""WRITE'', *<@FN/ERROR//;> This command causes TECO to search all the following pages for the string '""ERROR" and delete every occurrence of it. The @ construction must be used in this case be~ cause it allows the user to specify a de- = limiting character other than . The delimiting character (in this case /) must be specified twice after the string; the first to end the string and the second to indicate that a replacement string is not presenf. If a double were used as the delimiter, would be present which would cause an erroneous result. Only the methods described in this section should be used to exit from a loop. control commands described in Section 3.13 should not be used. Specifically, the flow Some violations of this rule may be successful, but generally they will not succeed. Matching pairs of angle brackets defining loops within the loop may, however, occur following the semicolon. 3.13 FLOW CONTROL COMMANDS TECO contains commands that enable the user to write editing programs capable of solving most com- plex editing problems. The iteration commands discussed in Section 3.12 are a specialized example. In addition to these, TECO has an unconditional branch command and a set of conditional execution commands that can be used to create any kind of conditional branch or conditional skip. 3.13.1 Command String Tags To have branching in a command string, there must be a method of naming locations in the command string. Location tags in the general form 3-45 - 292 - TECO ltag! may be pl'aced anywhere in a command string (except in text arguments). A tag is delimited before and after by an exclamation point and may contain any number of any ASCII characters except the special characters listed in Table 2-1 and exclamation points. Command string tags are also the recommended method for putting comments in TECO macros; they need not be referenced. 3.13.2 O Command The unconditional branch command is the O command. The general form is *Otag The text argument following the O command and delimited by an altmode is the tag naming the destination of the branch. The tag location itself may be either before or after the O command in the command string. The O command causes the command string execution pointer to be moved to the first character following the exclamation point that terminates the tag, and command execution continues from that point. - Tags are ignored except when an O command forces TECO fo scan the.command string for them, 3.13.3 Conditional Execution Commands All conditional execution commands have the following general form: *n''x,..! In this form, n is the numeric argument on which the decision to execute or not to execute is based. The quotation mark ('') is the first character of all conditional execution commands. The letter x represents the second character of the conditional execution command. The letter x may be any one of several letters depending on which conditional execution command is intended. The two command characters, ''x, may be followed by any string of commands terminated by an apostrophe('). If the condition specified by x is satisfied by the argument n, all the commands between ""'x and ' are executed in the usual manner. If there is no branch command within the range ''x..."; then ofter the last command in the range is executed, command execution falls through the apostrophe and executes the next command following it. If n does not satisfy the condition specified by x, then all the com- mands between ''x and the matching ' are skipped, and command execution continues with the first command following the apostrophe. The commands ''x and ' must be used in matching pairs and they may be nested in the same manner that parentheses surrounding arithmetic expressions may be nested. The individual conditional execution commands are shown in Table 3-7. 3-46 - 293 - . TECO Table 3-7 Conditional Execution Commands Command Function "G Execute the commands that follow if n >0; otherwise, skip to - the matching apostrophe on the right. n''L Execute the commands that follow if n<0; otherwise, skip to the matching apostrophe on the right. n''E Execute the commands that follow if n=0; otherwise, sklp to ‘the matching apostrophe on the right. n''N Execute the commands that follow if n#0; otherwise, skip to ’rhe mafchmg apostrophe on the right. n''C Execute the commands that follow if n is the decimal value of an ASCII symbol constituent character (a letter, digit, $, ., or % ); otherwise, skip to the matching apostrophe on the right. n-1"'L Execute the commands that follow if n<0; otherwise, skip to the matching apostrophe on the|rlghf n+1"'G Execute the commands that follow if n>0; otherwise, skip to the matching apostrophe on the right. n''D Execute the commands that follow if n is in the digit range (ocfal 60 to 71). ‘ n"'A Execute the commands that follow if n is in the alphabetic range (octal 101 to 132 or 141 to 172).. n''V Execute the commands that follow if n is in the lower case alphabetic range (octal 141-172), n'"'W Execute the commands that follow if n is in the upper case alphabetic range (octal 101 to 132), n''T Execute the commands that follow if n is 'true' (flag is on) (i.e., if n<0). n''F Execute the commands that follow if n is 'false' (flag is off) (i.e., if n=0). n''S Execute the commands that follow if n is 'successful' (i.e., if n<0) n''U 3.13.4 . Execute the commands that follow if n is 'unsuccessful' (i.e., if n=0). Examples of the Use of Flow Control Commands *ISTART!J—| —+|PDP~10 TECO) ' <s 5k () ;r-dl6 (B 1INSERT PAGE HEADING! - ICHANGE 5K TO 6K! <SWAR () ;-3DILOVE (B) > PZ""NOSTART (§)" EF . ~© 3-47 ICHANGE WAR TO LOVE! IGET NEXT PAGE AND! IRESTART IF NOT NULL! TECO - 294 - This small editing program contains an example of the O command, i.e., the OSTART ‘ command which causes a jump back to ISTARTI. for documentation, e.g., It also contains examples of command string tags used purely INSERT PAGE HEADING!. Normally, comments would be used only for lengthy and complex macros that the user expects to maintain. This example also shows how a conditional execution command may be combined with an O command to produce a conditional branch. When all three of the editing functions have been performed on the page, the P command is executed to output this page and read in the next. The program then tests Z (the number of characters in the buffer) to determine if any data was read in. If Z#0, data was read in, therefore a branch is taken to restart the program. When finally Z=0, the command OSTART is skipped, and execution branches to the concluding EF command. when a file contains null pages (consecutive form feed characters). Therefore, the This technique fails @ end-of-file test is preferred. *YZ'"'NI##1Z-4000+1''G 4000J0L121 (§) 0, . PO, .KO## 'ZIA.-Z'"NO## "' PEF * This slightly more complex command string shows how conditional execution commands may be nested. If the first Y command produces no data, the ''N command sends execution to the matching apostro- phe on the right. This is the last apostrophe, immediately prior to the PEF. Otherwise,. the commands following the '"'N are executed. The function of this command string is to convert a file with pages of arbitrary lengths to one with pages of approximately 4000 characters each. The command string operates as follows: Z=-4000 + 1''G means if Z>4000, i.e., there are af least 4000 characters on the current page, execute the following commands; otherwise, skip to the matching apostrophe (between @ and Z). If Z>4000, 4000JOL moves the pointer to the end of last complete line before the 4000th character in the buffer, Then, 12l @ 0, . P outputs this much of the buffer with a form feed character ofter it, and 0, .K deletes that which has been output. 1##1 and test Z again. Stay in this loop until Z<4000. Z.) moves the pointer to the end of the current buffer. pointer (.} at the end of the previous page. read in. Now, go back to Execution then skips to the apostrophe. A appends another page, but leaves the .-Z''N checks to determine if any data was actually If so, the loop is reentered at 1##1; otherwise the end of the file has been reached. When .~Z=0, execution skips to the matching apostrophe and then falls through the next apostrophe to the PEF that closes the output file. *<NSIN () ;:5¢0s (§) "'s-3DITAN (§) 'zJ> This example shows how the value returned by a colon search can be used as the argument for a conditional execution command. The N command searches through the file for the first occurrence of SIN on any page. When SIN is found, the command :SCOS 3-48 checks for an occurrence of COS - 295 following SIN on the same page. The colon search command returns the value -1 if the search is’ successful, and O if there is no COS following SIN on the page. argument for the ''S command. found is replaced by TAN, TECO If :SCOS This value is then used as the numeric has a value of -1, the occurrence of COS that was If :SCOS 6 has a value of 0, the commands -3DITAN are skipped. We then jump to the end of this page, ignoring all further occurrences of SIN and COS on it, and continue the iteration process. 3.14 Q-REGISTER COMMANDS Q-registers are a powerful feature of TECO with many different uses. registers is explained in Section 2.8. The general concept of Q- Section 3.14 explains the TECO commands that enable the use of Q-registers. The 36 Q-registers have the single character names A, B, C,..., Z, and 0,1,2,..., 9. Inthis section, the letter i is used to represent the name of an arbitrary Q-register. 3.14.1 Commands for Storing Integers The following commands enable the use of Q-registers for storing single 36-bit integers. 3.14.1.1 U Command = The command nUi stores the decimal integer n in Q-register i. n may be 35 35 any integer in the range =277 + <nX2"" -1. If anything was previously in Q-register i, it is destroyed. 3.14.1.2 Q Command - The command Qi is used to read the numeric value in Q-register i. Qi has no function other than returning the value in the specified Q-register as a numeric argument. |t does not alter the value in the” Q-register. for another command. 3.14.1.3 In order to be useful, Qi must be used as a numeric argument Qi is often used in conjunction with conditional commands. % Command - The command %i adds 1 to the integer in Q-register i and then returns the new value in the same manner as a Qi command. If the user wants to increment the value in Q-register i, but does not want the returned value to be used as an argument for the next command, he should type an altmode after the %i command. 3.14.2 Commands for Storing Character Strings The following commands enable the user fo store character strings of any length consistent with the amount of core available. 3.14.2,1 X Command = The X command copies characters from the editing buffer into a Q-register. These characters are not removed from the editing buffer. Any data previously in the Q-=register is destroyed. 3-49 - TECO - 296 - The various uses of the X command are as follows: a. m,nXi (m<n) copies the m + 1st through the nth characters in the buffer into Q-register i, b. If n>0, nXi copies everything from the current buffer pointer position through the nth following line terminator character into Q-register i. Xi is equivalent to 1Xi. c. . OXi copies everything from the beginning of the current line up to the buffer pointer into Q-register i. “d. If n<0, nXi copies everything from the beginning of the nth line preceding the current line up to the buffer pointer into Q-register i. =Xi is equivalent to =1Xi. An X command may require more core space for storage than is available. tries to expand its core. If so, TECO automatically If successful, TECO prints a message in the form [nK CORE] to show the new amount of core being used. If unsuccessful, TECO prints an error message and does not execute the X command. 3.14.2.2 G Command = The command Gi fetches a copy of the entire character string stored in Q-register i and inserts it into the editing buffer at the current position of the buffer pointer. contents of Q-register i are not changed. The The buffer pointer is positioned at the right end of the character string that was inserted by the G command. 3.14.2.3 M Command - TECO command strings are basically ASCII character strings and, as such, can be inserted or read into the editing buffer just like any other text. When a command string is in the editing buffer, it can be edited but it cannot be executed, because at that point it appears to be data to TECO. However, if the user copies a command string from the editing buffer into a Q-register (using an X command), then this command string can be executed. The command that accomplishes this is the Mi command. w The command Mi executes the text in Q-register i just as if this text had been typed in the command string instead of Mi. Using an Mi command is analogous to calling a subroutine. Any TECO com- mands may be included in the command string or ''macro'’ which is stored in and executed from the Q-register. Even double altmodes can be included if there are conditions under which the user wants execution to stop. The only restriction is that the commands must all be complete within the macro in the Q-register. For example, a command and its argument must not be split apart, one in the main command string with the Mi command and the other in the Q-register. cution strings, if included, must be complete within the Q-register. lterations and conditional exeIf an O command is used in the Q~register macro, the tag to which it branches must be in fhe. Q-register also. M commands may be nested up to approximately 10 levels, depending on the contents of the internal pushdown list. 3.14.3 Saving the Previous Command String After a command string has completed execution or if it has been aborted by means of the command, it may be stored in a Q-register. @ @ This is done by using an *i command as the first command - in the next command string. 3-50 -297- | TECO *I causes the entire previous command string, less one of the two concluding altmodes, to be stored in Q-register i. If the command string was. aborted by @ @, neither @ is sfored.wifh‘fhe command string. The previous contents of Q-=register i are lost. The asterisk has this function only when used as the first command in a command string. At any other position in a command string, asterisk has its usual meaning of multiplication (see Section 2.7.2). If the user intended to use *i as the first command but typed some other command first instead, he may recover the ability to use *i as the first command by typing enough rubouts to cause TECO to respond with a carriage return/line feed and a new asterisk. This technique will not work perfectly if some of the characters typed before the *i command were break characters (altmode, carriage return, etc.). In this case some of the leading characters of the preceding command string will be overwritten. The *i command is especially useful when an error occurs in a long command:string. in Section 3.14.5. 3.14.4 See the example ‘ Q-Register Pushdown List An additional Q-register feature is the Q-register pushdown list, which may be used for temporary storage during the execution of a command string. The command [i pushes the contents of Q-register i onto the stack. It does not change the contents of i. The command Ji pops the last pushed entry from the top-of the pushdown list into Q-register i. The previous contents of Q-register i are lost; the entry which was popped ‘off the pushdown list is erased from the top of the list. NOTE The Q-register pushdown list is cleared after the execu= tion of each complete command string (i.e., every time TECO types an * to indicate readiness to accept a new command string). ' The maximum depth of the Q-register pushdown list is 32 entries. (This number can be changed by redefining LPF in TECO.MAC and reassembling TECO.) 3.14.5 Examples of the Use of Q-Register Commands *QR-3UR This command subtracts 3 from the value in Q-register R 3-51 TECO - 298 - - *YISTIOUCIST + 11:S4 15%C-50"L0sT +1 (12 1 ZUEAQE-Z''NQEJOST + 1 (§)' PWEF §) 0,.P0,.k0sT () This command string arranges a file into pages of 50 lines each. The Y command starts operation at the beginning of the file, At 1ST! the command OUC sets the value 0 in Q-register C. At IST+1! search begins for a line feed. The command :S¢ returns a value of -1 if a line feed is found, in which case ''S causes the following commands to be executed. The %C com~ mand increments Q-register C by 1 and returns the new.value in C. If %C<50, jump back to IST+1! and search for another line feed. However, if %C=50, proceed as follows: (1) insert a form feed character because the output command used does not output one automatically, (2) output everything from the beginning of the buffer through the form feed character, then (3) delete everything that was output and (4) go back to 1ST! where the counter is reinitialized and start over. If the search command fails to find another line, with the value in Q-register C less than 50, it returns the value 0, therefore the ''S command causes a skip to the apostrophe at the end of the second line. The carriage return is ignored (see Section 3.18). The ZUE command stores the number of characters currently in the buffer in Qregister E. The A command reads in more data without moving the buffer pointer, while QE-Z'"'N checks the old value of Z with the new value to see if any data was actually read. If data was read, QEJ sets the pointer at the end of the old data and before the new data, then continue the line count at IST+11. If not, output the last page and close the file. jO,.X]O,.KZJG] 00 This command string moves everything to the left of the pointer from its position at the beginning of the page to the end of the page. The 0,.X1 command puts everything from the top of the page to the pointer in Qregister 1. The 0.,K command deletes this data from its present position. The ZJ com~mand moves the pointer to the end of the page. At this point the command G1 copies the contents of Q-register 1 into the buffer at the position of the pointer. *ZJ-5XAJBLGA This command string puts a copy of the last five lines of the page into Q-register A and then puts a copy of these five lines immediately after the eighth line in the page. It does not delete the five lines from their position at the end of the page. . 3-52 - 299 - TECO *HK@I#J<SREAD (§) ;-4DIACCEPT Q S#HXS *Y4PMSéPM52PMSEX . In this example, the @l command inserts a EXIT short macro into the buffer. The # char- 1C acter is used to delimit the insertion. The HXS command stores this macro in Q-register S. In the second command string, the MS command executes the stored macro on pages 5, 11, and 13 of the input file. Note that the initial Y command clears the macro from the buffer before the first page is read in. The EX command copies all remaining pages, closes the output file, and returns to the monitor, *J16< [DSDIMENSION (§) OLIXDK >J4L16<GD]> . ® The 16 <IDSDIMENSION (§) OLIXDK> command locates the first 16 lines on the current page that have the word DIMENSION in them, stores them on the Q-register pushdown list, and then deletes them from their present positions. Then the J4L16<GD]ID> command brings these 16 lines back onto the page immediately after the fourth line from the top. *A LOT OF TEXT Assume the user meant to insert "'A LOT OF TEXT'* but forgot the '"'I'" at the beginning. The following technique illustrates the simple way to recover from this ?NFI NO FILE FOR INPUT common error. 7z ®® ' Move the entire command string (with just one altmode at the end) into Q-register Z. *GZ Move the command string from Q-register Z into the. editing buffer at the current pointer position. OO Delete the altmode at fhe end of the command string. The rest of the command string is the text that was to be inserted, *® and it is now inserted. *sDITITLE (§) NLONG STRING (§) ~8DIA LOT OF TEXT ?NFO No File for Oufpuf An error is encountered early in a long command string. (The N=search failed because it could not output the page in the editing buffer. The commands preceding the N-search have been executed.) »2®® Save that entire command string in Q-register Z, ‘Save the current pointer position. Move the pointer to the beginning of the buffer (a convenient place to edit the command string), and get the string back from Q- *.UP *GZ register Z. Delete the commands ""5DITITLE "' 2450 that have already been executed. 3-53 TECO - 300 - *EWOUT.FIL Correct the error. Get back to the end of the command string. *STEXT (3) D The D command deletes the ‘ at the end of the command string. *0, .XZ Put the corrected string back into Q-register Z. *0, .K Delete the command string from the editing buffer. *QPJ Move the pointer back to its previous position. (In this particular case this step Mz Execute the corrected command string. is not actually necessary. * w<spivis (§) ;5= @riNoOT (D) LIXIKLGT> (8) (§) This example shows a simple technique for creating a TECO macro. The user purposely begins the command string with an illegal command. The rest of the command string is the TECO macro the user wishes to **ZHKGZ When the expected error occurs, move the command string to Q-register Z, then move it into the editing buffer. *JDHXZ Delete the W from the beginning of the macro, then save the correct macro in Q-register Z. ?ILL itlegal Command W create. 3.15 NUMERIC TYPEOUT COMMAND The numeric typeout command is n=, where n is the numeric value to be typed in decimal radix. If a double =sign is used, the numeric value is typed in octal radix. Example: *YZ = 2529 * ;_(l)A=== 3.16 This reads in a page and then types out the (decimal) number of characters in the page. This types the octal representation of the next character in the buffer. SPECIAL NUMERIC VALUES Several TECO commands, which have no other purpose than to return some particular numeric value, have already been discussed in this manual. These commands are B, Z, ., and Qi. that execute a function while returning a numeric value have also been discussed. are %i, colon searches, and all searches within iterations. numeric value is explained in Section 3.11. 3-54 Some commands These commands The concept of a command returning a - 301 - TECO All of these commands can be used as numeric arguments for commands that take a numeric argument, e.g., nl, n=, n;, nD, nUi, etc. To perform this function place the command, which returns a numeric value, in the position of n immediately before the command that takes a numeric argument. There are several other commands that return numeric values; these commands are listed below. The nA command (where n can be any numeric value, and serves only to differentiate this command from the A (append) command) is equivalent to the ASCII value of the character immediately to the right of the buffer pointer. The nA command equals 0, if the pointer is at the end of the buffer. The nA command is used primarily with conditional commands where one is checking for a particular character or range of characters. : The @ (or tE) command returns the value of the form feed flag. If, on the last input command (Y or A), input was terminated because a form feed character was encountered, E equals =1; otherwise, E equals 0. For further discussion of the form feed flag, see Sections 2.4, 3.3, 3.9, 3.10, 3.11 and 4.2, ' The @ (or tN) command returns the value of the end-of-file flag. [f the end of the input file was seen on the last input command (Y or A), tN = -1; otherwise, tN=0. When tN is set to -1, it will remain -1 until cleared by an ER or EB command. “When 1N is first set to =1, new data may or may not have been read into the editing buffer. Consequently, the tN flag should usually be tested after processing the input data. The 1F (or @ )] command is equivalent to the value of the console data switches. The @ (or tH) command is equivalent to the time of day in 60th's of a second (50th's where 50 Hz power is used). The ET command (without a numeric argument) returns the value of the ET flag. The ET command equals -1 if the flag is on and equals 0 if theflag is off. . The significance of this flag is discussed in Section 3.6 When the ET flag is on, the T command delivers all characters, including altmodes and control characters, to the terminal in their exact form rather than substituting other characters. ‘ The EU command returns the value of the case flag. The EU value is 1 if upper case characters are flagged on typeout; 0, if lower case characters are flagged on typeout - (default); and =1, if no case flagging is being performed. Refer to Section 3.6, The EH command returns the value of the error message flag. The EH value is 1 if only the error is typed; 2, if the error code plus one line is typed (default); and 3 if the full error message is typed. Refer to Segtion 5.2. The EO command returns the value of the version number flag. The EO value is 1 for version 21A of TECO and 2 for versions 22 and 23 of TECO. Refer to Section 3.17. The ES command returns the value of the automatic typeout flag. The ES value is -1 for automatic typeout after successful searches, 1 through 31 for automatic typeout with a line feed to indicate the pointer position, a decimal number greater than 31 for automatic typeout with the character equal to the ASCII value of the decimal number indicating the pointer position, and O for no automatic typeout (default). Refer to Section 3.11. : ]When using TECO with monitors prior to the 5,02 monitor, the tF TECO command must be entered in the up~arrow, F form because control=F is interpreted as a special monitor command (see Section 3. 18). 3-55 TECO - 302 - The@ (or t1) command, followed by an arbitrary character x, is equivalent to the ASCII value of the character that immediately follows the mand string. For example, in the command in the com= A, the character A is an argu- ment for @ and is not interpreted as a command. ( A equals 65.) The backslash(\) command (without a numeric argument) is equivalent to the decimal value of the digit string (optionally preceded by a + or - sign) immediately following the current position of the buffer pointer. The value is terminated by the first nondigit character encountered. If there is no digit string immediately following the buffer pointer, backslash equals 0. The backslash command moves fKe buffer pointer to the right end of the digit string and assumes the value of the digit string. The @ (or 1T) command is used to enable type=in of characters while the command string is being executed. When the @ command is enountered in a command string, execution of the command string stops and waits for the user to type any single character. When this character is typed, the @ command assumes the value of this character. Hence, the @ command is useful only as a numeric argument for another command, e.g., the command tTUC puts the ASCII value of the typed character into Q-register C. The @ command is most often used with a Section 3.17). message string preceding it (see The message string is used to inform the user that TECO is waiting for a character to be typed in. 3.16.1 Examples of the Use of the Special Numeric Arguments *J3C1A== If the fourth character in the buffer is 9, 7 the command string returns the indicated result. * *JIAITA-97"G1A-123"L1A-320cDQCI §!8!2A”NOA (§) 0B (§) ' ' This command string converts all lower case alphabetic characters in the buffer to upper case. Starting af the beginning of the buffer (J), if the next character has a decimal ASCII value between 97 and 122 inclusive (1A-97""G1A-123"'L), store the upper case value of this character in Q-register C (1A-32UC), delete the character (D) and replace it with the value in Q-register c(QCl (8)). Then TECO skips to !B (OB ); otherwise, it advances to the next character (C). In either case, af !Bl TECO checks to determine if there is another character in the buffer (2A''"N) and if so, returns to 1A! (OA ). When 2A equals 0, execution stops. *P< -1~ @ A> T3K COREI] % R , This command string outputs the current page, and then continues input until a form feed character is detected. This command string could be used on a file that is not divided into pages of a reasonable size. The A command is refeotedly executed until @ equals =1. When equals =1, the semicolon command causes an exit from the loop. 3-56 - 303 *tF= tH=ET= , 23094886497 This command string causes the (decimal) value in 60th's of a second, and the value of the ET flag to be typed out. At this execution, the _ i " TECO of the console data switches, the time of day 7 =1 : console switches were set fo octal 254064000141, the time was 08:26:29:33, and the ET flag was on. *1tMUO This command string stores the ASCI! value of the . letter M (77) in Q-register 0. FYNCHAPTER |_.|\= T6 * ' ' * This command string searches for the next chapter heading and then types out the number of the _ chapter. - The buffer pointer is positioned immedi- ately following the 6, after the command in this example has been executed. *<SFUNCTION L_. ; ‘) FUNCTION LETTER Here, the @ command is used as the argument @ |> , for an ni insert command. This command string inserts the letter which is typed in following each FUNCTION LETTER M occurrence of. the string FUNCTION that is found E_LL]’—N'CTWETTE_ NCTTON LETT ERR (K: by the search command. * : FLYITITLE . * PwiN; > () 3.17 . This command string inserts ""TITLE'' at the top ) ‘ of each page of a file, TECO PROGRAMMING AIDS Bugs can occur in editing macros written in TECO language as in any other program; therefore, TECO provides the following debugging aids for the TECO user. 3.17.1 Command The user can cause a statement to be typed out at any point in the execution of a command string. The command is used to perform this function. - fext The first The general form of this command is | is the actual command. It can be entered either as ""text'" is the character string that TECO types out when the second or TA. The string command is encountered. command marks the end of the text to be typed and must be entered as string can contain any characters except . The fext and the special characters. listed in Table 2-1. 3-57 The TECO - 304 - Example: NEW PAGE *YIST! (A) oucCisT+I1:S! "N%c-50"LOSTH (§) 1 121(3)0,. P, .KOST ()" ZUEAQE-Z"'NOST=1 (§)* A PWEF END) NEW PAGE This command string is identical to an_gxample NEW PAGE commands have been added. NEW PAGE used in Section 3.14; however two ‘ END —— 3.17.2 Question Mark (?) Command The question mark command has two uses in TECO. When question mark is the first character typed by the user after TECO has typed out an error message, it has the special function described in Section 5.2. However, at any other time the question mark can be entered in a command string exactly like any other command. This use of the question mark command causes TECO to enter trace mode. In trace mode, TECO types out each command as it is executed. A second question mark command takes TECO out of trace mode. Example: *JHT21L11A-9" NIMITA-58"NCOM (8) 'cD —~ (®) 'LoL AB:__LINE] C: LINE 2 LINE3 LINE4 ILITA-9""NIMIT1A-58""NCOM$T1A-58'""NCOIMITA-58""NCD § 'LOL$1A-9""NLOILI1A-9""N1 MITA-58'"NCO TMI1A-58""NCD S LOTLITA-9'TNLOTLTTA-9""NTIMITA-58""NC ?POP ;_:l??HT AB: E] C: LINE1 LINE2 LINE3 LINE4 After the first question mark cornmand, TECO begins typing out each command as it is executed. This enables the user to see exactly what the command string is doing. The ?POP error message is caused by the attempt to move the pointer beyond the end of the fourth (and last) line (the end of the buffer) - with the C command. The second question mark command turns off the trace feature so that the '"HT'' following it is not printed. 3.17.3 The EO Value The EO (Edit Old) feature enables TECO users to protect existing TECO macros from future changes to the TECO specifications. In most cases when features are added to TECO, the changes merely 3-58 =305 involve additional commands whose existence does not apply to changes such as these. macros not to run properly. in no way affects old TECO macros. The EO feature Occasionally, however, a new feature would cause old The EO feature is designed to protect old macros from such changes. Every version of TECO has an EO value. value is 1. TECO For all versions of TECO up through version 21A, the EQ For TECO versions 22 and 23, and all succeeding versions until the next specific ation change that would affect old macros, the EO value is 2. The EO value is always initially set fo the maximu m value for the version of TECO being run. enables all new features. By using the EO command the EQ value can be set to a lower value so as to disable features of TECO that were implemented since the macro was written and properly. This which would cause the macro not to function The EO command does not disable all new features , but only those that affect old macros. O0EO or resets the EO value to the maximum (standard) nEO (n<0) for the version of TECO in use. nEO (0<n<=max) sets the EO value to n. EO (no argument) returns the current value of the EQ flag. All TECO macros written before version 22 should be edited ""OEQ'" at the end. by putting ""1IEQ' _at " the beginning and All macros written with versio 22 n should have ''2EQ'" ""OEQ!'' at the end, efc. at the beginning and Table 3-8 Features Enabled by EO Values Greater Than 1 EO=1 Base value. EO=2 (1) Standard altmode changed from ASCII 175 to 033, (2) All control characters within text arguments reserved : as commands, instead of only @ , , @, @ in search strings. (3) Standard searches accept either upper or lower case (4) Vertical tab and form feed recognized as end-of -line (5) The P command does not create form feeds. (6) Command string jumps will not accept instances of alphabetic characters as a match. characters in addition to line feed. the target characters occurring within text arguments. (7) (8) (9) Because of (6) comments should be enclosed only by !,..1. The nl command must be followed by altmode. The @exif command is changed to @ . 3-59 - 306 - ' TECO Examples: *O= @ _ Initial setting is EO=2, 2 *IEOEO== Set EO value to 1. 1 Revert back to EO=maximum. IS *QEOEO== 3.18 COMMAND STRING TYPE-IN CONTROL COMMANDS The use of two successive altmodes as the command string terminator has already been discussed in Section 2.6. The use of rubout, @ , and double @ as command string erasing commands is discussed in Section 5.1. There are other characters, however, that are useful in the creation of command strings. 3.18.1 Carriage Return, Line Feed, and Spaces d strings. Except as text arguments, the characters carriage return and line feed are ignored in comman two nu= Spaces are also ignored except (1) when used in text arguments, and (2) when used between meric arguments as a + (see Section 2.7.2). Hence, these characters can be employed by the user ng when formatting command strings. The carriage return (and the monitor-supplied line feed followi it) is used to enable the user to conveniently type command strings much longer than a single line. Spaces are used to lend clarity to more complicated macros. 3-60 - 307 - TECO Chapter 4 Techniques 4.1 CREATION, EXECUTION, AND EDITING OF A FORTRAN PROGRAM This section demonstrates the use of TECO's multi-purpose commands to simplify the creation and editing of programs. The following example shows the creation and immediate execution of a FORTRAN program. .MAKE ATEST.F4 ) . * S TYPE 1) 1 Give the command to create the disk file ATEST.F4 using TECO. Begin insertion with the TAB command. FORMAT ("COMPILER ARITHMETIC TEST')) J=3) _7‘) C) 'T Rub out erroneous .5. Stop insertion and use the -T command to verify last line inserted. X=.5 * 1=K /J*(X*1 ., E+2-K*K/ Continue insertion. (3.%J))) | R=10.6) $=3.5)) =5 ) 1=2) N=7) Z=R+S*1/J*N/3) TYPE 2,11,Z ) 1 FORMAT (18,F20.12).) ENDJ EX End insertion, and then use the EX command to output and close the file. EXIT ' 1C 4-1 - 308 - TECO Give the command to compile and .EXECUTE ATEST) execute ATEST,F4. FORTRAN: ATEST.F4 The FORTRAN compiler discovers errors in the program. UNDEFINED LBLS 2 MULTIPLY DEFINED LBLS 1 MAIN. ERRORS DETECTED: 2 - 2TOTAL ERRORS DETECTED: 2 LOADING LOADER 4K CORE PEXECUTION DELETED EXIT 1C .TECO) Call TECO to edit ATEST.F4. *sF20. (%) oLpi12 (§) oTT ‘Change the second label 1 to 2, *G (§) Output the new version and automatically cause a repeat of the execution by using the EG command. FORMAT (I8, F20.12) 2 and then verify the change. FORTRAN: ATEST.F4 LOADING LOADER 4K CORE COMPILER ARITHMETIC TEST 103 21.683333118562 EXIT 1 Success. NOTES a. the following sequence of commands: .R TECO.) | FEWATEST. F4 b. is equivalent fo The command MAKE ATEST.F4) The -T command does not move the buffer pointer, therefore, the user can continue insertion from the point he left off. c. In this example, the EX command is equivalent to PWEF d. No filenome is given with the command TECO, therefore the name of the file used in the most recent edit—class command (i.e., MAKE, or TECO command) is assumed. In the example, the command TECO)) is equivalent to .R TECO) FEBATEST.F4 (§) Y 4-2 -309 - TECO NOTES (Cont) e. The command 5F20. moves the pointer to the line the user wishes to correct. The OL command positions the pointer immediately prior to the bad charggter 1. The D-.command deletes the 1; the 12 9 command inserts 2 in its place. The OTT command types out this entire line. f. The command EG example) to is equivalent (in this *PWEF ({0 EXIT T -EXECUTE ATEST.F4) 4.2 REARRANGING A FILE In Section 3.14, an example shows the use of a Q-register in moving a segment of text from one place on a page to another place on the same page. This section describes how to move blocks of text, or whole pages, to entirely differenf places in o file. Example: The user has a file named PGM. MAC on the disk and this file contains data in the following form: A8 EORM) cD (FORM) EF EORM) GH (FORN) 1 KL €orRM) MN ORM) OP wheré each of the letters A, B, C... represents 20.|ines of text. ' The user infends to rearrange the file, as shown in the following example: AOB ‘DMN@ EFICJKL P GH The following commands achieve this rearrangement., R TECO 6) *EBPGM.MAC Call TECO with extra core.Y Specify the file_ and get the first page. *NC Output AB @ and input CD. *J20X1 Save all of C in Q-register 1. *20K Delete C from its position in the editing - buffer. *NG Output D @) and input EF, Output EF @) and input GH. *HX2 Save all of GH in Q-register 2. *Y *20L - Delete GH and input LJ. | Move the pointer to the beginning of J. - - 310 - TECO *Gl *NM Bring in all of C from Q-register 1. input KL, output Output ICJ . KL *HX1 @ by discarding the previous contents). Delete MN and input OP. *Y Save all of O in Q-register 3. Delete O from the editing buffer. and clear the editOutput P *J20X3 #20K *P , and input MN. Save all of MN in Q-register 1 (there- ing buffer. . Bring GH into the buffer from Q- *G2 register 2, Qutput GH, close the output file (now *HPEF ' called nnnTEC.TMP), rename the input file PGM.BAK, and then rename the output file PGM.MAC. *EBPGM.MAC Now edit the partially revised file Y just output. Loop around fo the be- ginning of the file. Move the pofnfer to the beginning of B. *20L @ *G3 6 @ Bring in all of O from Q-register 3. *PWHK Output D @ , and then clear OQutput AOB @ and input D. *ND % the buffer. *Gl *EX Bring in all of MN from Q-register 1. and continue the Output MN EXIT been output. Then close the output input/output sequence until GH has tc file (called nnnTEC.TMP), delete the . - file PGM.BAK, and then rename the new output file PGM.MAC. Finally, previous PGM.BAK, rename the input — 4,3 exit to the monitor. SPLITTING AND MERGING FILES This section demonstrates the procedure to split a file into several smaller files and the procedure to merge parts of several files. Example 1: Splitting a File Assume the user has a file named FILE.CBL on the disk; this file contains data in the following form: ABCD@EF FOR GHIJ KL@@ MNOP 4-4 TECO where each of the letters A, B, C, ... represents 20 lines of text. The user wants to separate FILE.CBL into two files: a. FILE.1 containing AB (FOR b. FILE. 2 containing KL (FOR And to discard the rest of the data. To accomplish this proceed as follows. .R TECO) Call TECO. *ERFILE.CBL (§) EWFILE.1 Open the input file and the first output file. Y Input AB. hiy *HPeF Output AB D ® and input CD. Ovutput CD and then close the out~ put file FILE.1. Clear the buffer (deleting CD from it) and continue inputting pages of *ek the file and searching for K. If K is not found on a given page, clear the buffer, and read in the next page. The < command does not perform output. Thus EF, GH, and IJ are all read in and then deleted. When KL is read in, the search stops. *EWFILE. 2 Open the second output file. iy Output KL 0, . P Position pointer at the end of M. *20L v ) Example 2: and input MN. Ovutput M and then close the output file FILE. 2, Exit to the monitor with the job completed. Merging Files Assumed the user has two files: a. MATH.BAK containing AB CD@EFGH.IJ EORMKL b. MATH.F4 containing Where A, B, C,... each represents 20 lines of text, and A', B',... represent updated versions of A’ B’l.l. TECO -312 - The user wants to merge MATH.F4 with the latter half of MATH.BAK to produce: MATH. NEW con_toining A'8 EORM) C'D* FORRD E'F GHEORM) 1) KL He proceeds as follows. .R TECO Call TECO. *ERMATH.F4 (3) EWMATH. NEW v ®O® e OO Open the first input file and the output file. Input A'B'. Output A'B' @ , input C'D', output C'D! @) . and input E'F', *pw () Output E'F! @ . *ERMATH. BAK Close input from MATH.F4, and open *Y Delete E'F' from the buffer and input MATH.BAK for input. AB. 6 ®O® Delete AB, input and delete CD and EF, then input GH. Output GH @ , input and then *NL output 1J @) , then input KL, *HPEF (19 Output KL, close the output file MATH.NEW, and then exit to the monitor with the job completed. EXIT T The technique shown in Example 2 illustrates the best method for recovering from the error indicated by the error message: ?0UT-200000 Output Error 200000 - Output File 018TEC.TMP Closed If this error occurs during an editing job initialized by the TECO filnam.ext,) command or an EB command, the incomplete output file has a temporary name of the form nnnTEC.TMP (see Section 3.2); otherwise, the incomplete output file will have the name specified by the user. for a list of error messages and their meanings.) Example 3 is more explicit illustration of recovery from the foregoing error. (Refer to Appendix A =313 - Example 3: : Recovery from an Output Error .TECO FIL.DOC) ~ *edit a few pages *P ?0UT-200000 | Oufput Error 200000 - Output File 018TEC.TMP Closed *ERO1STEC. TMP (8) EWFIL.NEW ) Y (D (®) *Nlast page edited and successfully output 9 PW *ERFIL.DOC (§) - , Y *«last page edited and successfully output *Y and edit next page 9 *Nnext place to edit (@ *finish editing normally & (3 - EXIT 1C -RENAME FIL.DOC=FIL.NEW) 4.4 EXAMPLE OF AN ADVANCED TECO MACRO This section demonstrates a TECO macro for formatting DECsystem-10 Macro assembly language programs. The procedure for executing this macro is as follows: .RTECO 6) ! ' Call TECO with enough core to cov, er the maximum page size. *ERDTA7:PGMFMT.TEC @D Open the file containing the macro *YHX1 Input the macro and save it in Qregister 1. *EBPROGRM. MAC - ' *Y :M]@ : * @ itself for input. Open for editing the file that is to be formatted by the macro. Read in the first page of the file. Execute the macro. _Exit with job completed. TECO TECO - 314 - Formatting Macro (PGMFMT.TEC) TEO ISTARTIOUL<S { ($) :%L>ZIR1A-10" N%L® ICOUNT LINES ON PAGE! ILOOPIJQL<OUC | IEXECUTE LOOP ONCE FOR EACH LINE! trstcHnatcotac (®) IFSTCH2!1A-9"ECOOP (§) '1A-32"NOZ (§)" IFSTCH31% C-8"GOZ () 'C1A-32"EOFSTCH3 (§)'1A-9"EQC-7"GOZ (§) 'COFsTCH4 (§)' ac-8"6oz (§)' IFSTCH410US ICHANGE LEADING SPACES TO A TAB! IFSTCH5!-D%$-QC"'LOFSTCH5 (§)' ~1() oop ITAG 1%C-6""GOZ (§) ‘C1A"COTAG (§) '1a-58"NOZ ()" | icolontouscia-9ecooP (§) 11a-32"Noz (§) ILOOK FOR A COLON! ICOLON21%S (§) C1A-32"EOCOLON2 (§) 'QC+Qs-7"GOZ ($) 'QC+QS-7"EOCOLONS (®1a-9"Noz (§) 'D ICOLON3IR1A-32"EDOCOLONZ (3) I ¢ ICHG SPACES AFTER COLON TO TAB! I0P11A-90"GOZ (§) '1A-65"1.0Z (§) 'ouC 10P21%C (§) C1A-90"GOZ (§) '1A-64"GO0OP2 (§) '14-57'GOZ (§) '1A-47"GOOP2(3)! 1A-9"ECIA-32"EOZ (§) '1A-9""EOZ IGIVE UP IF NO OPERANDS! 1A-32"NOZ (§) 'ac-7"Goz (§) 'C1A-32"0z (§) '1A-9"E0Z (§)" D - HIF A SINGLE SPACE FOLLOWS OP, CHANGE IT TO A TAB! IOP310UC IEOL!%C ILOOK FOR END OF LINE OR SEMI-COLON!! IEOL211A-9"'EOEOL (§) '1A-13"'G1A-59""NOEOL (§) '0Us ISEMIIR1A-32""N1A-9"NOSEMI2 () ' '%S ISEMI2IQS"'NC | (3) @c-as-g"'L —I(§) '+ ILINE UP COMMENTS! 1ZIL> PZ'"NOSTART (§) ‘oucC | ILOOK FOR NEXT PAGE! !GETIVZ''NOSTART (§) '%C-10"NOGET (§) 'EFOEO IQUIT WHEN 10 YANKS YIELD NO DATA! An explanation of the macro follows. 1EO The 1TEO command enables only those features found in versions prior to 21A for which this macro was wriften. ISTART! [t is assumed that the pointer is at the begin= ning of the first page of the file. OoUL <S! Initialize line counter. i %L> ZIJRTA-10""N%L' Count the line feed characters on the page. If the last character on the page is not a line feed, count those characters following the last line feed character as one more line. - 315 - This is the standard technique for including ICOUNT LINES ON PAGEI comments in TECO macros. JQLL ' Execute everything which follows, down to the > character on the second to the : ouUC last line, once for each line on the page. Initialize first character counter for the line. If the first character in the line is greater ' 1A-90"'GOZ ' ' than Z (decimal 90) in the ASCH set, skip this line by jumping to 1Z1. If the first character is alphabetic or period, 1A""COTAG ' or %, or a dollar sign (i.e., legal as the o ‘ first character of a Macro language symbol), go to ITAG!. : pointer past the tab, then go to IOP!. If the first character is a space, continue 1A=32""NOZ . ! ~ on to IFSTCH3!; otherwise, skip this line. ) IFSTCH31%C-8""GOZ Increment the character counter (counting 'C leading spaces), and if the new total is more than eight spaces, skip to the next line; otherwise, move the pointer to the 1A-9""EQC-7""'GOZ ' —atl QC-8"G0Oz $) If the next character is another space, go . back to IFSTCH3!, | If the character is neither a tab nor a space, if more than eight spaces preceded this and. character, skip to the next line. If the character is a tab, but more than seven spaces preceded this tab, skip to the next line. Otherwise, go to IFSTCH4l. Initialize space deleted counter. ' IFSTCH410US next character. | 1A-32""EOFSTCH3 ' T Otherwise, go to IFSTCH2!, If the first character is a tab, move the | IFSTCH211A-9"ECOOP ' COFSTCH4 TECO Delete last space seen. ) IFSTCH51-D %S-QC''LOFSTCHS ' - Increment space deleted counter. Then, if 7. —'| OOP When the count of spaces deleted reaches the number of spaces there were, insert a tab and then go to 1OP!, Increment the character counter (counting 'C ITAG1%C-6"'GOZ the new value of this counter is still less than the number of characters (spaces) counted on the line, go back to IFSTCHS5!. characters in the tag), and if the new total is more than six spaces, skip to the next line. Otherwise, move the pointer to the next character. 1A""COTAG .' 1A-58""NOZ ICOLON!OUSC If the next character is a symbol constituent, : 'OCOLON $ O go back to ITAG!, If the character is a colon, go on to ICOLONI; otherwise, skip fto the next line. Initialize counter of spaces following the colon, and move the pointer to the next character. ' TECO - 316 - 1A-9""ECOOP (§)" 1A-32"Noz (3)' If the character after the colon is a tab, move the pointer to the next character and go to {OP]I. If the character is not a space either, skip to the next line. Otherwise, continue on to ICOLON2I, ICOLON2!%S (§) C 1A-32"EOCOLON2 . ac+as-7'coz (3)' QC+Qs-7""EOCOLON3 (§)' 1A-9"NOZ (§) 'D ICOLONSIR Increment the space=~following-colon counter, and then move the pointer to the next character. The altmode following %S prevents the value returned by the %5 command from being used as an argument for the following C command. If the next character is another space, go back to ICOLON2I, If the total count of the symbol characters before the colon and the spaces after the colon is more than seven, skip to the next line. If the count mentioned above exactly equals seven, go to ICOLONS3!, With the count mentioned above less than seven, if the next character is not a tab, skip to the next line. If this character is a tab, delete it and continue to ICOLONS!, Move pointer back one character (i.e. ,- back past the next space or the colon). 1A-32"EDOCOLONS (§) c —i§)oor Otherwise, the pointer is now in front of the colon. Move it forward over the colon and then insert a tab to replace the deleted spaces. Then go to IOPI, IOP11A-90"GOZ (§)" 1A-65'"L0Z (§) If the character passed over is a space delete it and go back to ICOLONZ3!, *0uUC 10P21%C (§) C 1A-90"Goz (§)' 1A-64"GOOP2 (§)' 1A-57GOZ (3) 1A-47GOOP2 (3)" If the first character in the operator field is not alphabetic, skip to the next line. Otherwise, initialize the op field character counter. Increment operator field character counter and then move pointer to the next character, If the next character is above Z in the ASCII set, skip to the next line. If it is alphabetic, go back to 10P21, If the character is greater than the digit nine in the ASCII set, skip to the next line. If it is a digit, go back to I0P2!, 1A-9"E If the character is not a tab, skip to the ' following the comment ""GIVE UP IF NO OPERANDS'". The leading spaces are for appearance only and are ignored. (A tab could not be used for this purpose.) c1a-32"e0z (§)" 1A-91£0Z (§) '00P3 If it is a tab, move the pointer to the next character. [f this character is a tab or a space, skip to the next line. If the character is anything else, go to 1OP3!, 4-10 -317 - 1A-32"NoZ (§)' If the letter following the last letter or digit of the operator is anything but a space (or the tab that was processed above), skip to the next line. Qc-7coz (§) 'C If the operator is more than seven characters long, skip to the next line. Otherwise, move the pointer to the character after the space following the operator. 1A-32"e0Z (§) 1A-9"E0Z (§)" -D If this character is another space or a tab, skip to the next line. Delete the space between operator and operand and insert a tab in its place. 10P310UC Initialize operand character counter. leoLi%wc (3) ¢ Increment operand character counter and move pointer to the next character. 1A-9"'eOEOL ()" If the character is a tab, go back to 1A-13"G If the character is equal to or below carriage return in the ASCII set, skip to the next line by skipping to the last ' in the line starting with ISEMI2!. IEOL!, 1A-59"NOEOL (§)" If the character is not a semicolon, go ~back to IEOLI, ous Initialize the counter for spaces and tabs preceding the semicolon. ISEMIIRT1A-32""N1A-9"" NOsSEMI2 (§) ' ' Move the pointer back one more character from the semicolon. If this character is not a space or tab, go to ISEMI2I, %S (§) DOSEMI Count the space or tab, then delete it and go back to ISEMII, ISEMI2IQS"'N If there are no spaces or tabs preceding the semicolon, skip to the next line by skipping to the next to the last ' in this line. This check prevents most cases of inserting tabs before semicolons that occur in SIXBIT or ASCIZ fields. Move pointer forward over the last char- QC-QS-8"L "I 1ZIL> ' |.| acter seen, and then insert a tab before the semicolon. If the number of characters in the operand field, not counting the spaces and tabs preceding the semicolon, is less than eight, insert a second tab. Otherwise, skip to the next line. Move pointer to the next line, and then go back to the beginning of the loop. When every line on the page has been edited by the loop, output this page, clear the buffer, and then yank in the next page. Z''NOSTART(3)" If the yank produces any new data, go back to ISTARTIL. TECO - 318 - TECO ouC Otherwise, initialize the yank counter. IGETIYZ""NOSTART ' Try another yank. If this produces any %C-10""NOGET ' new data, go back to ISTART!. Increment the yank counter, and if it is still less than 10, try again. EF When a total of 10 straight yanks ofter the OEO The OEO command re—enables TECO com- P command fails to produce any new data, close the output file. mands to the current version. - 319 - | TECO Chapter 5 User Errors < This chapter describes two types of errors: (1) typing errors discovered by the user before a command string is completed, and (2) command errors detected by TECO. that there is a third class of error. The user should realize, however, Because TECO interprets almost every character as a rcommand, there can be cases where, if the user fails to notice a command string typing error, TECO executes a command that the user did not intend. For example, if the user meant to type the command *INAME but forgot to type the "'I'*, then TECO is forced to interpret the command as an N-search for "' AME"* and act accordingly. 5.1 There is no way to protect the user from errors of this type. ERASING COMMANDS If the user makes an error while typing a command string and discovers the error before terminating the command string (with a double altmode), the error can be corrected using one of three erasing commands described below. All of these must be typed before the double altmode that terminates the command string. 5.1.1 Rubout Command Rubout is used to erase typed=in characters one at a time starting with the last character typed in. Example After typing the portion of the command string shown below, the user discovers that he has mispelled the name "'Ericson''. *3LKILEIF ERICXON To nullify the error, he types three successive rubouts. As he does this, TECO responds by retyping the characters which are being rubbed out. *LKILEIF ERICXON N R o RO x The actual function of the rubout character is to delete the last typed character in the command string. Consequently, if the incorrect character is not the last in the string, all characters back to that point must also be rubbed out. 5-1 - 320 - TECO Rubout is a nonprinting character; consequently, the actual line appears as follows: *LKILEIF ERICXONNOX When the user has rubbed out the incorrect character, he continues the command string from the last correct character. *3LKLEIF ERICXONNOXSON (§) 01T Two successive rubouts are required to erase a carriage return and the monitor-generated line feed following it. 5.1.2 Double @ Command The command @ 6@ (two successive control-Gs) is used to erase an entire command string. In the following example the user has decided, after typing the '"N'', to quit and start over. this by typing two successive control-Gs. He does (Control-G echoes visibly as '' t{G'' and audibly as a bell ring.) *3LKILEEF ERIXON (IQ) (Q) * @ @ cannot be typed in the alternate up-arrow, character form described in Section 2.2. 5.1.3 @ Command The @ command is another erasing command available to the TECO user. The @ command erases everything in a command string back to the last carriage-return/end-of =line character pair. It does not erase the carriage-return nor end-of-line character. The end-of-line characters are line feed, vertical tab and form feed. In monitors previous to 5.02B, control-U is intercepted by the monitor and erases only back to the most recent break character (carriage-return, linefeed, formfeed, altmode). Example 1: *ILINE ONE) The user makes an error typing the LINE TWO ) fourth line and uses the com-— mand to erase the entire line. The LINE THREE ) . KINE FOUR @ LINE FOUR) @> . @ command causes a carriage réturn=line feed to be echoed but the carriage return and line feed are not inserted. 5-2 -321 - TECO Example 2: *ILINE ONE ) LINE TWO ) ) LINE FOUR @ KINE THREE ) The user makes an error on the third line but does not notice it until he is on the fourth line. In order to erase back to his error without erasing the entire command _ string, he types control=U, rubout, @ control=U. FOUR'". @ The first erases "'LINE The rubout erases the line feed that marks the_end of the third line, and the second {U) erases "'LINE THREE" LINE THREE) LINE FOUR ) and the carriage-return at its end. ®® 5.1.4 Bell-Space Command The bell-space command is not actually an erasing command, but it is usually used in conjunction with the erasing commands. typed. Its function is to cause the current line of the command string to be re= It is used when the user has typed so many rubouts on a line that he cannot tell exactly what has been typed. Specifically, if the user types @ and space in succession, everything in the command string back to, but not including, the last carriage return line feed pair is immediately retyped on the next line. The user may then continue the command string just as if bell=space had not been typed. The bellspace is not stored in the command string. Neither does it remove anything from the command string. Example: *ISTAET: RO) T ERT - TRZE : —isw, (@, START: TRZE SW,CCLFLG —+{; CLEAR FLAG 5.2 ERROR MESSAGES When TECO encounters an illegal command or a command that cannot be executed, an error messége is printed on the user's terminal. An error message consists of three parts, some of which are printed automatically and some of which can'be printed at the user's option. The first part of the message is a question mark followed by a 3-letter mnemonic code for the error message. The second is a brief, one-line, statement of the error condition. The last part is a more complete explanation of the error. In the standard version of TECO the first two parts of the error message are automatically printed; the third pan‘ is printed only if the user requests it. In Section 5.2.2 there is an explanation of how to TECO - 322 - obtain the optional parts of the error message, and in Section 5.2.3 there is an explanation of how to change TECO so that more or less of the error message is printed automatically. - When an error message is generated, the command to which it refers is not executed, the remainder of the command string is ignored, and TECO returns to command mode. Also any commands that the user migh} have typed ahead are erased. Example: *SWORD -4DUINEW The error message points out the presence ?NAU No Argument Before U of N argument, The commands SWORD 9 -4D a U command not preceded by a numeric have been executed, but the commands UINEW have not. After an error message has been printed, the user has the option to use either or both of two special commands, ? and /, that are designed to help the user after a command error has been encountered. These commands are described below. Note, however, that these two commands have the special properties described below only immediately after an error has occurred. If any other command is typed after an error has occurred, TECO assumes that a new command string is being typed and the ability to use the ? and / commands for this error is lost. Also note that the *i command described in Section 3.8.8 is frequently useful after an error is encountered. 5.2.1 Question Mark Command In some cases, the user may not be able to determine immediately which command in the string caused the error. This could occur, for example, if there were several commands of the same type in the com= mand string. In such a case, the user can use the question mark command to obtain more information. The question mark commdnd, when used immediately after an error message fypeéuf, causes the offending command and several of the preceding characters in the command string to be typed out. A maximum of 10 characters of the command string are typed; usually this number is sufficient to identify the command that caused the error. Note that when the question mark command is used in this manner, it is not necessary to type altmode or any other character after the question mark. A second question mark is always typed ofter the last character of the group. The character at which the error was detected is the last character before the second question mark typed. Another use of the question mark command is explained in Section 3.17. -323 Example: - TECO _ *HX 2PG2Z1-1U2PG2ZJ @ .« N PNTQ No Text in Q-register 2 *? 2ZJ)-1U2PG2? : According to the error message, one of ‘ _ » - 5.2.2 the G2 commands specifies a Q-register that does not contain text. The question mark command is used and the second G2 command is identified as the offending . command. Slash Command When a command error occurs, -one or more of the three parts of the correspond ing error message is automatically printed. If all three parts of the error message have not yet been printed and the user needs a more detailed explanation of the error, he may type the slash command to obtain more information. The slash command, when used immediately ofter an error message, causes the next unprinted part of the error message to be printed. It may be used enough times to cause all three parts of the error message fo be printed, but no more. Note that when the slash command is used in this manner, it is not necessary to type altmode or any other character after the slash. NOTE The verbal parts 2 and 3 of the error messages printed by TECO are obtained from a system file (TECO.ERR) ex~ternal to TECO itself. If for any reason this file cannot be read, only the code portion of the error message is printed, and this is followed by the special message "'"?EEE Unable to Read Error Message File'. case the / command cannot be used. In this Another use of / is described in Section 2.7. 2. Example: *EBTEST.CBL (§) EX ?BAK Cannot Delete Old Backup File */ Failure in rename process at close of editing job initiated by an EB command or @ TECO command. There exists an old backup file TEST.BAK with a profection <7/7> such that it cannot be deleted. Hence the in- ut file TEST.CBL cannot be renamed to '"TEST. BAK'TM. ifie output file is closed with the filename "O09TEC. TMP!, The RENAME UUO error code is 2. 5.2.3 EH Command As was stated above, TECO error messages consist of three parts. automatically typed. matically typed. The Fiést, or code, pert is always With the standard version of TECO, the second, brief message, part is also auto- The third, more lengthy part is obtained by the / command at the option of the user. - 324 TECO By use of the EH command, the user may change TECO so that more or less of the error message is automatically typed. This is done as follows: 1EH sets TECO so that only the code part of the error message is automatically printed. 2EH sets TECO so that both the code and the 1-line message parts of the 3EH sets TECO so that all three parts of the error message are alwqys OEH resets TECO to the system standard mode of error message typeout. (Normally equivalent to 2EH.) EH message are automatically printed. automatically typed. ' (with no argument) returns the value of the current EH setting. - 325 - : TECO Appendix A TECO Error Messages The following table lists the error messages from TECO. The three-letter message preceded by a question mark is always typed; the second part of the error message, which is a short explanation of the error, is always typed in standard versions of TECO. The detailed message is typed if the user types a slash command (/) immediately following the short error message. Table A-1 TECO Error Messages ?ARG 3) 4) Improper Arguments The following argument combinations are illegal: , (no argument before comma) m,n, H, ,H (where m and n are numeric terms) (because H=B, Z is already two arguments) ~ (H following other arguments) ?BAK Cannot Delete Old Backup File Failure in rename process at close of editing job initiated by an EB command or a TECO command. There exists an old backup file filnam.BAK with a protectionXnnn> such that it cannot be deleted. Hence the input file filnam.ext cannot be renamed to "'filnam.BAK"' . The output file is closed with the filename ""nnnTEC.TEMP'', where nnn is the user's job number. The RENAME UUO error code is nn. ?COR Storage Capacity Exceeded The current operation requires more memory storage than TECO now has and TECO is unable to obtain more core from the monitor. This message can occur as a result of any one of the following things: 1) 2) 3) command buffer overflow while a long command string is being typed, Q-register buffer overflow caused by an X or { command, editing buffer overflow caused by an insert command or a read command. ?COS Contradictory Output Switches The GENLSN and SUPLSN switches may not both be used with the same output file. ?EBD EB with Device dev Is lllegal The EB command and the TECO command may be specified only with file structured devices, i.e., disk and DECtape. TECO - 326 - Table A-1 (Cont) TECO Error Messages ?EBF EB with lllegal File filnam.ext The EB command and the TECO command may not be used with a file having the filename extension ''.BAK"' or with a file having the name ''nnnTEC.TMP'"'. Where nnn is the user's job number, the user must either use an ER-EW sequence, or rename the file. ?EBO EB, EW, or EZ Before Current EB Job Closed After an output file has been opened by a TECO command or an EB command, no further EB, EW, or EZ commands may be given until the current output file is closed. ?EBP EB lllegal Because of File filnam.ext Protection. The file filnam.ext cannot be edited with an EB command or a TECO command because it has a protection <nnn> such that it cannot be renamed at close time. ?EEE Unable to Read Error Message File An error, whose code was typed previous to this error message, has occurred, and while TECO was trying to " find the proper error message in the error message file, one of the following errors occurred: 1) the error message file, TECO.ERR, could not be 2) ~ 3) 4) 5) found on device SYS:, an input error occurred while TECO was reading the file TECO.ERR, the error message corresponding to that error code is missing from TECO ,ERR, the user's TECO job does not currently have enough room for a buffer to read the error message file into, and no more core can be obtained from the monitor, for some strange reason device SYS: could not be initialized for input. EM with lllegal Argument nn The argument n in an nEM command must be greater than zero. PEMA ~ EM with No Input Device Open EM commands apply only to the input device, and so should be preceded by an ER (or equivalent) command. To position a tape for output, that unit should be temporarily opened for input while doing the EM commands. ?EMD ?ENT-00 lllegal Output Filename ''filnam.ext"! ENTER UUO failure 0. The filename '"filnam.ext"" specified for the output file cannot be used. The format is invalid. Output UFD dev:[pj,pg] Not Found . ENTER UUOQ failure 1. The file filnam.ext[pj, pgl specified for output by an EW, EZ, or MAKE command cannot be created because there is no user file directory with project-programmer number [pj, pgl on device dev. -02 Output Protection Failure _ ENTER UUO failure 2. The file filnam.ext [pj, pgl specified for output by an EW, EZ, EB, MAKE, or TECO command cannot be created either because it already exists and is write —protected <nnn> against the user, or because the UFD it is to be entered into is write—protected against the user. A-2 - 327 - TECO Table A-1 (Cont) TECO Error Messages Output File Being Modified : ENTER UUO failure 3. The file filnam.ext specified for output by an EW, EZ, EB, MAKE, or TECO command cannot be created because it is current being created or modified by another job. : Output UFD or RIB Error ENTER UUO failure 6. The output file filnam.ext cannot be created because a bad directory block was encountered by the monitor while the ENTER was in progress. The user may try repeating the EW, EB, or TECO command, but if the error persists, it is impossible to proceed. Notify your system manager. _ No Room or Quota Exceeded on dev: ENTER UUO failure 14. The output file filnam.ext cannot be created because there is no more free space on device dev:, or because the user's quota is already exceeded there. -15 + Write Lock on dev: ENTER UUO failure 15. ' ' The output file filnam.ext cannot be created because the output file structure is write=locked. -16 Monitor Table Space Exhausted _ ENTER UUO failure 16. The output file filnam.ext cannot be created because there is not enough table space left in the monitor to allow the ENTER. The user may try repeating the EW, EB, or TECO command, but if the error persists he will have to wait until conditions improve. Output SFD Not Found ENTER UUO failure 23. The output file filnam.ext cannot be created because the sub~file=directory on which it should be ENTERed cannot be found. Search List Empt A : ENTER UUO fairure 24. The output file filnam.ext cannot be created because the user's file structure search list is empty. Output SFD Nested too Deeply ENTER UUO failure 25. The output file filnam.ext cannot be created because the specified SFD path for the ENTER is nested too deeply. No Create for Specified SFD Path ENTER UUO failure 26. The output file filnam.ext cannot be created because the specified SFD path for the ENTER is set for no creation, - TNn ENTER Failure nn on Output File filnam.ext The attempted ENTER of the output file filnam.ext has failed and the monitor has returned an error code of nn. This error is not expected to occur on an ENTER. Please send the TTY printout showing what you are doing to DEC with an SPR form. - 328 TECO Table A-1 (Cont) TECO Error Messages nEO Argument Too Large EOA The argument n given with an EO command is larger than the standard (maximum) setting in EO=n for this version of TECO. This must be an older version of TECO than the user thinks he is using; the features corresponding to EO=n do not exist. 2FNF-00 Input File filnam.ext Not Found LOOKUP UUO failure 0. The file filnam.ext specified for input by an ER, EB, or TECO command was not found on the input device dev. =01 ' Input UFD dev:[pi,pgl Not Found LOOKUP UUO fuifi.ure 1. The file filnam.ext [pi,pgl speci- fied for input by an ER, EB, or TECO command cannot be found because there is no User File Directory with projectprogrammer number [pj,pgl on device dev. -02 : Input Protection Failure : LSOKUP UUO failure 2. The file filnam.ext[pj,pgl speci- fied for input by an ER, EB, or TECO command cannot be read because it is read-protected <nnn> against the user. -06 Input UFD or RIB Error LOOKUP UUO failure 6. The input file filnam.ext cannot be read because a bad directory block was encountered by the monitor while the LOOKUP was in progress. The user may try repeating the ER, EB, or TECO command, but if the error persists all is lost. -16 Notify your system manager. Monitor Table Space Exhausted LOOKUP UUO failure 16. The input file filnam.ext cannot be read because there is not enough table space left in the monitor to allow the LOOKUP, The user may try repeating the ER, EB, or TECO command, but if the error persists he will have to wait until system conditions improve. Input SFD not Found LOOKUP UUO failure 23. The input file filnam.ext cannot be found because the sub~file=directory on which it should be looked up cannot be found. Search List Empty LOOKUP UUO failure 24. The input file filnam.ext cannot be found because the user's file structure search list is empty. Input SFD Nested too Deeply LOOKUP UUO failure 25. The input file filnam.ext cannot be found because the specified SFD path for the LOOKUP is nested too deeply. LOOKUP Failure nn on Input File filnam.ext The attempted LOOKUP on the Input file filnam.ext has failed and the monitor has returned an error code of nn. This error is not expected to occur on a LOOKUP. Please send the TTY printout showing what you were doing to DEC with an SPR form. TECO - 329 Table A-1 (Cont) TECO Error Messages Device dev: Directory Full ?FUL ENTER UUO failure n. The file filnam.ext specified for output by an EW or MAKE command cannot be created on DECtape dev because the tape directory is full. 21AB ed by an A macro contained in a Q-register and being executwithin M command contains an iteration that is not closedthat is nofthe Q-register by a >, or a parenthetical expression Incomplete <...> or (...) in Macro closed within the Q-register by a ). ?ICE Command in Sgarch Argument lllegal Control-E s a @ command that is A search argument orcontain incomplete? either not defined ?ACT Illegal Control Command t<char> in text Argumendntor search In order to be entered as text in an Insert commatN - te) tH and command, all control characters (1@ -ise they are intermust be preceded by 1R or 1T. Otherw '' 1 <char>'' is ter charac control The nds. preted as comma an undefined text argument control command. ?IDV Input Device dev Not Available dev Initialization failure. Unable to initialize the device e else for input. Either the device is being used by someon right now, or else it does not exist in the system. ?IEC ter '*<char>'" After E Illegal Charac E are EB, EF, The only commands starting with the letter EZ. When used EG, EH, EM, EO, ER, ET, EU, EW, and E may not be nt) argume text a in not as a command (i.e., followed by any character except one of these. Re-Init Failure on Device dev After EM ?1EM ing an Unable to re-initialize the device dev after execut ng fo retryi after s persist error this If it. on EM command nd comma EW (or nd comma ER initialize the device with an r. manage system your consult ), desired is device the fo output if ?IFC FS and FN. The only commands starting with the letter Fin are than EF or a text argument) When used as a command (othercharac ter other than one of these. F may not be followed by any ?AFN lllegal Character ''<char>'" ofter F Illegal Character ''<char>'' in Filename xt[m,n] File specifications must be of the form dev:fi,lnam.e and n m and umeric alphan are ext where dev, filnam, and ied may are numeric. No characters other than the onesndspecif the and comma EZ or EW, ER, EB, the en appear betwe altmode terminator( ?ILL ?ILR » ). Ilegal Command <char> The character ''<char>'' is not defined as a valid TECO command. . Rename It Cannot Lookup Input File filnam.extto job initiated by an EB Failure in rename process af close of editingdo a LOOKUP on the oricommand or a TECO command. Unable toto rename it ''filnam.BAK"', ginal input file dev:filnam.ext in order C.TMP'', where nnn The output file is closed with the name "annTE is the user's job number. The LOOKUP error code is nn. A-=5 TECO - 330 - Table A-1 (Cont) TECO Error Messages ?INP-nn0000 Input Error nn0000 on File filnam.ext. A read error has occurred during input. The input file filnam.ext has been released. The user may try again to error flags are nn0000, This number represents the read the file, but if the error persists, the user will have to return to his backup file. The input device status word (Note: I/O status word (rh) with bits 22-35 masked out.) (040000 -- block too large). (100000 -- parity or checksum error). (140000 -- block too large and parity error). (200000 -~ device error, data missed). (240000 -- block too large and device error). (300000 ~-- parity error and device error). (340000 ~- Elock too large, parity error, and device error). (400000 -- improper mode). (440000 ~- block too large and improper mode). (500000 ~= parity error and improper mode). (540000 ~- glock too large, parity error, and improper mode). (600000 ~~ device error and improper mode). (640000 -~ block too large, device error, and improper mode). (700000 -~ parity error, device error, and improper mode). (740000 -- block too large, parity error, device error, and improper mode). 2108 lllegal Character ''<char>"" in 1/O Switch The only valid characters in switches used with file selection commands are the alphabetic characters. ?1QC lllegal command "'<char> The only valid '* commands are "'G, ''L, "N, "E, "'C, A, IID, Ilv’ IIW' IIT’ IIF’ ||S' qnd llU. ?IQN Hlegal Q-register Name '"<char>"" The Qi-register name specified by a Q, U, X, G, %, M, [, 1, or * command must be a letter (A thru Z) or a digit (0 thru 9). ?IRB Cannot Rename Input File filnam.ext to filnam.BAK Failure in rename process at close of editing job initiated by an EB command or a TECO command. The attempt to rename the original input file filnam.exf to the backup filename "*filnam.BAK"" has failed. The output file is closed with the name "nnnTEC.TMP'', where nnn is the user's job number. ?IRN The RENAME UUO error code is nn. Cannot RE-Init Device dev for Rename Process Failure in rename process ot close of editing job initiated by an EB command or a TECO command. Cannot reinitialize the original input device dev in order to rename the input file filnam.ext to "'filnam.BAK"'. The output file is closed with the name ''nnnTEC.TMP"', where nnn is the user's job number. ?I1SA n Argument with Search Command The argument preceding a search command indicates the number of times a match must be found before the search is consider ed successful. This argument must be greater than 0. - 331 - TECO - Table A-1 .(Conf) TECO Error Messages ?MAP Missing ' In attempting to execute a conditional skip command (a "' command whose argument does not satisfy the required con- dition) no ' command closing the conditional execution string can be found. Note: n''...' strings must be complete within a single macro level. ?MEE Macro Ending with E. ' : A command macro being executed from a Q-register ends with the character "'E''. This is an incomplete command. E is the initial character of an entire set of commands. The other character of the command begun by E must be in the ' same macro wiflq the E. ?MEF Macro Ending with F A command macro being executed from a Q-register ends with the character ''F'' (not an EF). This is an incomplete command. F is the initial character of an entire set of commands. The other character of the command begun by F must be in the same macro with the F. ?MEO ‘Macro Ending with Unterminated O Command The last command in @ command macro being executed from a Q-register is an O commoand with no altmode to mark the end of the tag=name argument. The argument for the O command must be complete within the Q-register. ?MEQ ?MEU Macro Ending with ' A command macro being executed from a Q-register ends with the '' character, This is an incomplete command. The '' command must be followed by one of the characters G, L, N, E, C,A DV, W,T,F, S, or Uto indicate the condition under which the following commands are to be executed. This character must be in the Q-register with the "' . Macro Ending with t r A command macro being executed from a Q-register ends with the t character. This is an incomplete command. The t command takes a single character text argument that must be in the Q-register with the t . MIQ Macro Ending with <char> , A command macro being executed from a Q-register ends with the character '"<char>''. This is an incomplete command. The <char> command takes a single character text argument to name the Q-register to which it applies. This argument must be in the same macro as the <char> command itself. ?MLA Missing < There is a right angle bracket not matched by a left angle bracket somewhere to its left. (Note: an iteration in a macro stored in a Q-register must be complete within the Q-register.) ?MLP Missing ( Command string contains a right parenthesis that is not matched by a corresponding left parenthesis. TECO -332 - Table A-1 (Cont) TECO Error Messages ?MRA Missing > In attempting to exit from an iteration field with a ; command (or to skip over an iteration field with a O argument) no > command closing the iteration can be found. Note: iteration fields must be complete within a single macro level. ?TMMRP Missing ) The command string contains, within an iteration field, a parenthetical expression that is not closed by a right parenthesis. TMMUU Macro Ending with t1 A command macro being executed from o Q-register ends with control-t or t1. This is an incomplete command. The t1 command takes a single character text argument that must be in the Q-register with the 11, ?NAE No Argument Before = The command n= or n== causes the value n to be typed. The = command must be preceded by either a specific numeric argument or a command that returns a numeric value. NAI No Altmode after nl Unless the EO value has been set to 1, the numeric insert command nl must be immediately followed by altmode. NAQ No Argument Before '’ The "' command must be preceded by a single numeric argument on which the decision to execute the following commands or skip to the matching ' is based. NAU ?NCS ?NFI No Argument Before U The command nUi stores the value n in Q-register i. The U command must be preceded by either a specific numeric argument or a command that returns a numeric value, No Command String Seen Prior to *i The *i command saves the preceding command string in Q-register i. In this case no command string has previously been given. No File for Input Before issuing an input command (Y or A) it is necessary to open an input file by use of an ER, EB, or TECO command. ?NFO No File for Output Before giving an output command (PW, P, N, EX, or EG) it is necessary to open an output file by use of an EB, EW, EZ, MAKE, or TECO command. INTQ No Text in Q-register x Q-register x, specified by a G or M command, does not contain text. ?0CT - 18" or "'9" in Octal Digit String In a digit string preceded by 10, only the octal digits 0-7 may be used. =333 - TECO Table A-1 (Cont) TECO Error Messages 0DV Output Device dev Not Available Initialization failure. Unable to initialize the device dev for output. Either the device is being used by someone else right now, or it is write locked, or else it does not exist in the system. ?0LR Cannot Lookup Output File dev:filnam.ext to Rename It Failure in rename process at close of editing job initiated by an EB command or a TECO command. The special LOOKUP on the output file filnam.ext required for DECtape in order to rename the file to '"filnam.ext'' has failed. The original input file filnam.ext has been renamed ''filnam.BAK"', but the ouiput file is closed with the name "'"nnnTEC,TMP'!, where nnn is the user's job number. ?0UT-nn0000 The LOOKUP UUOQO error code is nn. Output Error nn0000 ~ Output File nnnTEC. TMP Closed An error on the output device is fatal. The output file is closed at the end of the last data that was successfully output. It has the fitename "'nnnTEC . TMP'', where nnn is the user's job number. See Section 4.3 for a recovery technique. The output device status word error flags are nn0000. (Note: This number represents the 1/O status word (rh) with bits 22-35 masked out.) ‘ . (000000 -=- end of tape). (040000 -- block number too large: device full or quota exceeded). (100000 =- parity or checksum error). (140000 == block number too large and parity error). (200000 -- device error, data missed). (240000 -- block number too large and device errror). (300000 -- parity error and device error). (340000 -- block number too large, parity error, and device error). (400000 -- improper mode or device write locked). (440000 -- block number too large and improper mode). (500000 -- parity error and improper mode). (540000 -- block number too large, parity error, and improper mode). (600000 -~ device error and improper mode). (640000 -- block number too large, device error, and improper mode). ' (700000 -- parity error, device error, and improper mode). (740000 -- block number too large, parity error, device error, and improper mode). ?PAR Confused Use of Parentheses ?POP Attempt to Move Pointer Off Page with J, C, R, or D The argument specified with aJ, C, R, or D command must A string of the form (...<...) has been encountered. Parentheses should be used only to enclose combinations of numefic arguments. An iteration may not be opened and not closed between a left and right parenthesis. point to a position within the current size of the buffer, i.e., between 0 and Z, inclusive. - 334 - TECO Table A-1 (Cont) TECO Error Messages ?PPN lllegal Character ''<char>'" in Project-programmer Number Project-programmer numbers in file specifications must be given in the form %m,n] where m and n are octal digit strings separated by a comma. No characters other than the ones specified may appear between the enclosing brackets. ?RNO Cannot Rename Output File nnnTEC.TMP Failure in rename process at close of editing job initiated by an EB command or a TECO command. The aftempt to rename the output file nnnTEC.TMP to the name ''filnam.ext" originarly specified in the EB or TECO command has failed. The original input file filnam.ext has been renamed ""filnam.BAK'', but the output file is closed with the name ""nnnTEC.TMP"', where nnn is the user's job number. The RENAME UUO error code is nn. RSAL Second Argument Less Than First In a two-argument command, the first argument must be less than or equal to the second. SNA Initial Search with No Argument A search command with null argument has been given, but there was no preceding search command from which the argument could be taken. ?SNI ; Not in an lteration The semicolon command may be used only with a string of commands enclosed by angle brackets, i.e., in an iteration field. ' ?SRH Cannot Find ''<text>'" A search command not preceded by a colon modifier and not within an iteration has failed to find the specified character string "'<text>''. After an S search fails the pointer is left positioned at the beginning of the buffer. After an N or < search fails the last page of the input file has been input and, in the case of N, output, and the buffer cleared. Note that when this message occurs, the text string printed includes all control-character commands included in the search argument. ?STC Search String Too Long The maximum length of a search string is 80 characters including all string control commands and their arguments. ?STL Search String too Long _ The maximum length of a search string is 36 character positions, not counting extra characters required to specify a single position. MAG Missing Tag Ixxx! The tag Ixxx! specified by an O command cannot be found. This tag must be in the same macro level as the O command referencing it. TAL Two Arguments with L The L command takes at most one numeric argument, namely, the number of lines over which the buffer pointer is to be moved. - 335~ TECO Table A-1 (Cont) TECO Error Messages MTY Ilegal TTY 1-O Device A terminal may be specified as an input-output device in an ER, EW, EZ, or MAKE command only if it is not being used to confrol an attached job, the user's own terminal included. ?UCA Unterminated tA Command A tA message type-out command has been given, but there is no corresponding tA to mark the end of the message. 1A commands must be complete within a single command level. ?UFS Macro Ending with Unterminated File Selection Command The last command in a command macro being executed from a Q-register is a file selection command (ER, EW, EB, or EZ) with no altmode to mark the end of the file specifications. The file selection command must be complete within the Q-register. ' ?UIN Unterminated Insert Command An insert command (possibly an @ insert command) has been given without terminating the text argument at the same macro level. ' UIS Undefined 1/O Switch "' /xxx"" _} The switch ''/xxx'" is not defined with either input or output file selection commands. The only switches currently defined for input or output file selection commands are /GENLSN and /SUPLSN., ?USR Unterminated Search Command A search command (possibly an @ search command) has been given without terminating the text argument at the same macro level. UTG Unterminated Tag A command string tag has been indicated by a | command, but there is no corresponding ! to mark the end of the tag.- Tags must be complete within a single command level. ?UUO lllegal UUO : Internal error. The illegal instruction <lh,rh> has been encountered at address nnnnnn. This is caused by either a TECO bug or a monitor bug. Please give printout to your system manager, or submit it to DEC with an SPR, TECO - 336 - - 337 - TECO Appendix B ASCIlI Characters Table B-1 ASCII Characters Octal Decimal Comment and Section Reference Null or 000 0 Ignored on input. Ignored on type=in. Control -A 001 1 TECO command (Section 3.17). Control-B 002 2 003 3 Character Manual Symbol Control =Shift-P Control-C @ . nllnserf only., ~ Monitor command {Section 3.18). A special character (Section 2.2). Monitor command (Section 3.10). A special character (Section 2.2). 'nl @ insert only. Echoes as tC-carriage return-line feed. Control-D ~ 004 4 TECO command (Section 3.17). Control-E @ 005 5 TEC? command (Sections 3.11 and Control -F @ 006 6 TECO command (Section 3.16). Bell @ 007 7 Echoes and prints as a single bell ring 3.16). Monitor command (Section 3.18). A special character (Section 2.2). and 1G. Double @and @._,are TECO commands (Section 5.1) and special characters (Section 2.2). 8 TECO command (Section 3.16). Prints 011 9 TECO command (Section 3.8). 012 10 Backspace @ 010 Tab - Line Feed R : os tH. Ignored in command strings except as a text argument (Section 3.18). The symbol | is used only to represent an explicitly-typed line feed. It is not used for the line feed that the monitor TECO - 338 - Table B-1 (Cont) ASCIl Characters Character Manual Symbol Octal Decimal Line Feed (Cont) Comment and Section Reference . generates when a carriage return is typed. In data, line feed defines the end of a line (Section 2.3). Vertical Tab @ 013 1 Form Feed FORM 014 12 In data, vertical tab defines the end of a line (Section 2.3). TECO command (Section 3.6). In dataq, form feed defines the end of a page (Section 2.3). - Carriage Return p) 015 13 Ignored in command strings except as a text argument. (Section 3.18). When this character is typed the monitor automatically generates a line feed following it. Control-N @ Control-O 016 14 017 15 TECO command (Section 3.11). : Monitor command (Section 3.6). A special character (Section 2.2). nl insert only. Echoes as tO-carriage return-line feed. Control~-P 020 16 Monitor command (Section 3.18). A special character (Section 2.2). Control-Q @ 021 17 TECO command (Section 3.11). Control =R ® 022 18 TECO command (Sections 3.8 and 3.11)." Control ~S @ 023 19 TECO command (Section 3.11). Control -T @ 024 20 Two different uses as TECO commands Control-U @ 025 21 @ TECO command (Section 5.1). A special character (Section 2.2). nlin— sert only. : Control-V (Sections 3.8, 3.11, 3.16). Echoes as tU carriage return-line feed. 026 22 TECO command (Sections 3.8 and 3.11). Control-W 027 23 TECO command (Sections 3.8 and 3.11). Control =X 030 24 Two different uses as TECO commands (Section 3.11). Control -Y ® 031 25 Control-Z @ 032 26 TECO command (Section 3.10). Echoes as tZ-carriage return-line feed. Used as end-of-file signal when doing data input from a TTY. - 339 - : TECO Table B-1 (Cont) ASCI| Characters Character Manual Symbol Octal Decimal Comment and Section Reference 033 : 27 Alphanumeric argument terminator (Section 2.7). A special character Altmode or (Control =Shift-K) (Section 2.2). Echoes and prints as $. Two successive altmodes are used to Control-Shift-M Control-Shift-N Control =Shift-O Space 034 035 28 * TECO command (Section 3.11). 29 | Two different uses as TECO commands (Sections 3.8, 3.11, 3.16). 30 - 037 - 31 TECO command (Section 2.7). 32 040 L Control =Shift-L ® @06 terminate a command string (Section 2.6). Ignored in command strings except as a text ar- gument or when used instead of + with numeric arguments (Section 3.18). . 041 3 042 34 043 35 044 36 045 . TECO command (Section 3.13). Used as a prefix for a whole class of TECO commands (Section 3.13). TECO command (Section 2.7). 37 TECO command (Section 3.14). 046 38 TECO command (Section 2.7). 047 39 TECO command (Section 3.13). 050 40 TECO command (Section 2.7). 051 41 TECO command (Section 2.7). 052 42 Two different uses as TECO commands (Sections 2.7 and 2.14). 053 43 054 44 TECO command (Section 2.7). 055 45 TECO command (Section 2.7). 056 46 TECO command (Sections 3.2 and 3. 4). 057 47 - : TECO command (Section 2.7). Two different uses as TECO commands (Sections 2.7 and 5.2). TECO - 340 - Table B-1 (Cont) ASCII Characters Character I%Acng: Octal Decimal 0 060 48 1 061 49 2 062 50 3 063 51 4 064 52 5 065 53 6 066 54 7 067 55 8 070 56 9 071 57 072 58 ym Comment and Section Reference TECO command (Section 3.11). Device name delimiter (Section 3.2). ; 073 59 TECO command (Section 3.12). < 074 60 TECO command (Section 3.12). = 075 61 TECO command (Section 3.15). > 076 62 TECO command (Section 3.12). ? 077 63 Two different uses as TECO commands (Sections 3.17 and 5. 2). @ 100 64 TECO command (Sections 3.8 and 3.11). A 101 65 Two different uses as TECO commands (Sections 3.3 and 3.15). B 102 66 TECO command (Section 3.4). Also used C 103 67 TECO command (Section 3.5). Also used in the "'"C command (Section 3.13). D 104 68 TECO command (Section 3.7). E 105 69 Used as a_prefix for many TECO commands: EB, EF, EG, EH, EM, EO, ER, ES, ET, EU, EW, EX, EZ (Sections in the EB command (Section 3. 2). 3.2, 3.6, 3.9, 3.10). Also used in the ""E command (Section 3.13). - 341 - ' TECO Table B=1 (Cont) ASCIl Characters Character lgAanual ymbol F. Octal Decimal 106 70 Comment and Section Reference Used in the EF commands (Section 3.9). Also in FS and FN commands (Section 3.11). G 107 71 TECO command (Section 3.14), . Also used in the EG command (Section 3.10) and ''G command (Section 3.13). H 10 l | 72 TECO command (Section 3.4), 111 73 TECO command (Section 3.8). J 112 74 " TECO command (Section 3.5). K 113 75 TECO command (Section 3.7). L 114 76 TECO command (Section 3.5). Also used in the '"'L command (Section 3.13). M 115 77 TECO command (Section 3.14). Also used in the EM command (Section 3. 2). N 116 78 TECO command (Section 3.11). Also _used in the '""N command (Section 3.13). "Also used in FN command (Section 3.11). o) 117 79 TECO command (Section 3.13). P 120 80 TECO command (Section 3.9). Q 121 81 'TECO command (Section 3.14), R 122 * S 82 TECO command (Section 3.5). Also _ 123 used in the ER command (Section 3.2). 83 TECO command (Section 3.11), ) T Also used in ES and FS commands. (Section 3.11). 124 84 TECO command (Section 3.6). Also used in the ET command (Sections 3.6 and 3.16). \Vj X 125 85 126 86 127 87 130 88 TECO command (Section 3.14). _ Used in the EW command (Section 3. 2) and the PW command (Section 3.4). Otherwise ignored in command strings. TECO command (Section 3.14). ' L7 Also used in the EX command (Section 3.10). ~ 342 TECO Table B-1 (Cont) ASCH Characters Command and Section Reference Octal Decimal 131 89 TECO command (Section 3.3). 132 90 TECO command -(Section 3.4). Also [ 133 N TECO command (Sections 3.2 and 3. 14). N\ 134 92 Two different uses as TECO commands ] 135 93 TECO command (Sections 3.2 and -3.14). Character IS\AY?:QJ:ll used in the EZ command (Section 3. 2). (Sections 3.8 and 3.14). tor N\ t 136 94 When used as a command, indicates that —or _ - 137 95 TECO command (Section 3.11). 7 140 96 a 141 97 Equivalent to A in command strings. b 142 98. Equivalent to B in command strings. c 143 99 Equivalent to C in command strings. d 144 100 Equivalent to D in command strings. e 145 101 Equivalent to E in command strings. f 146 102 Equivalent to F in commor}ld strings. g 147 103 Equivalent to G in command strings. h 150 104 Equivalent to H in command strings. i 151 105 Equivalent to | in command strings. i 152 106 Equivalent to J in command strings. k 153 107 Equivalent to K in command strings. | 154 108 Equivalent to L in command strings. m 155 109 Equivalent to M in command strings. n 156 110 Equivalent to N in command strings. ‘o 157 111 Equivalent to O in command strings. p 160 112 Equivalent to P in command strings. q 161 113 Equivalent to Q in command strings. the next character is to be interpreted as a control character. TECO - 343 Table B-1 (Cont). ASCIl Characters Octal , Decimal Comment and Section Reference r 162 114 Equivalent to R in command strings. s 163 115 | Eguivalent to S in command strings. t 164 116 Equivalent to T in command strings. u 165 117 Equivalent to U in command strings. v 166 . 118 Equivalent to V in command strings. W 167 119 - Equivcfleni‘ to W in command strings. X 170 120 Equivalent to X in command strings. y 171 121 Equivalent to Y in command strings. 2 172 122 { 173 | 174 124 } - 175 125 Character - t\SAonual ymbol | | Equivalent to Z in command strings. 123 Converted to altmode (033) when read from TTY unless user has specified TTY LC mode. Equivalent to altmode (033) when executing commands or being typed as text if the EO value has been set to 1. 126 176 Converted to altmode (033) when read from TTY unless user has specified TTY LC mode. Equivalent to altmode (033) when executing commands or being typed as text if the EO value has been set to 1. Rubout or Delete -@ 177 ' 127 TECO command (Section 5.1). A special character (Section 2, 2). nlinserf only. Does not print. Echoes as the character being erased. TECO : - 344 - - 345 - TECO Appendix C Summary of Commands C.1 INITIALIZATION AND FILE SELECTION Table C-1 Command Description Comm'and Function _ Reference ] INITIALIZATION AND FILE SELECTION dev:filnam.ext [proj, prog] File specifications (Section 3. 2) ERfilespecification Select file for inF;ut. (Section 3. 2) ' Position magnetic tape (Section 3. 2) EWfilespecification Select file for output. (Section 3. 2) Zero directory and select file for output. (Section 3. 2) Select file for input and output, with back- (Section 3. 2) Equivalent to EWfilnam.ext (§). (Section 3. 1) nEM [EZfilespecification EBfilespecification " [MAKEfilespec) TECOfilespec)) /GENLSN /SUPLSN up file protection. Equivalent to EBfilnam. ext Y. (Section 3. 1) Used with EW or EB to cause line sequence (Section 3. 2) Used with ER, EB, or EW to suppress line (Section 3. 2) numbers to be generated. sequence numbers. INPUT Clear Buffer and input one page. (Section 3. 3) Input one page and append to current buffer (Section 3. 3) confents. ' BUFFER POSITIONS Before first character; 0. (Section 3. 4) Current pointer position; number of characters (Section 3. 4) to the left of the pointer. TECO - 346 Table C~1 (Cont) Command Description Command Function Reference End of the buffer; number of characters in the buffer. (Section 3.4) m+1st through nth characters in the buffer. (Section 2.7) Entire buffer; B, Z. (Section 3.4) ARGUMENT OPERATORS Add. (Section 2.7) Add. (Section 2.7) Subtract. (Section 2.7) Multiply. (Section 2.7) Divide and truncate. (Section 2.7) Logical AND. (Section 2.7) Logical OR. (Section 2.7) Perform enclosed operations first, (Section 2.7) Accept number in octal radix. (Section 2.7) POINTER POSITIONING nJ Move pointer to position between nth and nt1st characters. (Section 3.5) nC Advance pointer n positions. (Section 3.5) nR Move pointer back n positions. to -nC. nlL Equivalent (Section 3.5) Move pointer to beginning of nth line from (Section 3.5) current pointer position. TYPE-OUT nT Type all text in the buffer from the current f)ointer position to the beginning of the nth (Section 3.6) Type the mt+1st through the nth characters. (Section 3.6) Type the decimal integer n. (Section 3.15) Type the octal integer n. (Section 3.15) Change typeout mode so that no substitutions are made for nonprinting characters. (Section 3.6) Restore typeout mode to normal. (Section 3.6) ine from the pointer position. - 347 - TECO Table C-1 (Cont) Command Description Reference Function Command Flag lower case characters on typeout (Section 3.6) 1EU Flag upper case characters on typeout. (Section 3.6) -1EU No case flagging on typeout. (Section 3.6) -1ES Set automatic typeout after searches. (Section 3.11) nES(n>0) Set aufomafié typeout aofter searches and (Section 3.11) OEU - (standard). include a character to indicate the position of the pointer. ' Set to no automatic typeout after searches. (Section 3.11) @message Type the message enclosed. (Sectioq 3.17) tL or form feed Type a form feed. (Section 3.6) Inhibit typeout. (Section 3.6) OES DELETION nD -nD nK - Delete the n characters following the pointer (Section 3.7) position. Delete the n characters preceding the pointer (Section 3.7) Delete all characters in the buffer from current pointer position to the beginning of the nth line from the pointer position. (Section 3.7) Delete the m+1st through the nth characters. (Section 3.7) position. ) INSERTION Insert the text delimited by | and altmode. | (Section 3.8) Insert the character with ASCII value n (Section 3.8) Insert the text delimited by the arbitrary (Section 3.8) Insert the ASCII representation of the (Section 3.8) Translate to lower case. (Seétion 3.8) * Translate to upper case. (Section 3.8) (decimal). character following I. decimal integer n. When used inside text arguments, this means translate special characters @, [, \, 1, 1, <+ to ""lower case'' range. (Section 3.8) TECO - 348 - Table C-1 (Cont) Command Description Command Function -Reference O INSERTION (Cont) (Section 3.8) Accept next character as text. Used inside text arguments to cause all control characters except to be taken as text. , (Section 3.8) , and altmode Nullified by a second OUTPUT AND EXIT PW Output the current page and append a form feed character to it. (Section 3.9) nP Output the current page, clear the buffer, and read in the next page. Continue this (Section 3.9) m,nP Output the mt+1st through the nth characters. Do not append a form feed character, and do not change the buffer. (Section 3.9) EF Close the output file. (Section 3.9) Close the output file and exit to the (Section 3.10) process until the nth page from the current page has been input. @ or tZ monitor, Exit to the monitor. (Section 3.10) EX Output the remainder of the file, close the output file, and then exit to the monitor. {Section 3.10) EG Output the remainder of the file, close and then re-execute the last compile~class com= mand that was typed. (Section 3.10) nStext Search for the nth occurrence (following the pointer) of the text delimited by S and (Section 3.11) Search for the nth occurrence (following the pointer) of the first text string and replace (Section 3.11) Equivalent to nStext (Section 3.11) SEARCH altmode, but do not go beyond the end of the current page. ‘nFStexf text it with the second text string. Do not go beyond the end of the current page. nNtext except that if the text is not found on the current page, pages are input and output until it is found. TECO | - 349 - Table C=1 (Cont) Command Description Command Reference Function SEARCH (Cont) hFNtext ' text ‘ Equivalent to nFStext text except (Section 3.11) that if the text is not found on the current page, pages are input and output until it is found. N «— text ' Equivalent to nNtext except that it (Section 3.11) does input only, no output. snStext Equivalent to nStext except that it (Section 3.11) returns a value of -1 if the search succeeds or 0 if it fails instead of an error message. The : command can also be used with FS, N, FN, and «. ([@nS/text/ ' Equivalent to nStext except that the (Section 3.11) text is delimited by the arbitrary character following the S. The @ command may also be used with FS,N, FN, ande-. Reset search mode to accept either cose. (Section 3.11) In @ or n tX (n#0) Set search mode to ''exact'' mode. (Section 3.11) Translate to lower case. (Section 3.11) Translate to upper case. (Section 3.11) When used inside text arguments, this means translate special characters @, [, \, 1, t, «to ""lower case'’ range. (Section 3.11) Accept next character as text. (Section 3.11) Used inside text arguments to_cause all ' ’ control characters except (Section 3.11) @ 660 0 () or 01X and altmode to be taken as text. -Nullified O by a second . Used inside search argments to indicate accept either case for following characters. (Section 3.11) ® Nullified by a second When used inside a text argument, accept (Section 3.11) any character at this position in the search ® @ string. Accept any separator character at this position. - (Section 3.11) Accept any character except the arbitrary (Section 3.11) character a following TECO - 350 - Table C-1 (Cont) Command Description Command Function Reference SEARCH (Cont) @ . @ A Take the next character in the search string (Section 3.11) Accept any alphabetic character as a match. (Section 3.11) Accept any lower case alphabetic character as a match, (Section 3. 1) literally, even if it is a control character. Accept any upper case alphabetic character as a match, Accept any digit as a match. (Section 3. i) Accept any end-of-line character as a match. (Section 3. 11) Accept any string of spaces and/or tabs (Section 3. 11) Accept the ASCII character whose octal (Section 3. 11) Accept any one of the characters in the brackets as a match. (Section 3. 11) as a match. value is nnn as a match. ITERATION AND FLOW CONTROL Perform the enclosed command string n times. (Section 3. 12) If n=0, jump out of the current iteration field. (Section 3. 12) Jump out of the current iteration field, if the last search executed failed. (Section 3. 12) Define a position in the command string with (Section 3. 13) Otag Jump to the position defined by ltag!. (Section 3. 13) n''Ecommands' If n=0, execute the commands specified between '"'E and '; otherwise, skip to the '. (Section 3. 13) n''Ncommands' If n#0, execute the enclosed commands. (Section 3. 13) n''Lcommands' If n<0, execute the enclosed commands. (Section 3. 13) n''Gcommands' If n>0, execute the enclosed commands. (Section 3. 13) n=1'""Lcommands' If néO, execute the enclosed commands. (Secfion 3. 13) n+1'"'Gcommands' If ngO, execute the enclosed commands. (Section 3. 13) If n is the ASCII value (decimal) of a symbol (Section 3. 13) ltag! n''Ccommands’ the name ''tag''. constituent character, execute the enclosed commands. - 351 - TECO Table C=1 (Cont) Command Description Command Function Reference ITERATION AND FLOW CONTROL (Cont) n''Dcommands' If n is a digit execute the enclosed commands. (Section 3.13) If n is alphabetic, execute the enclosed (Section 3.13) If n is lower case alphabetic, execute the (Section 3.13) If n is upper case alphabetic, execute the (Section 3.13) n"'Tcommands' If n is frue, execute the enclosed cqmmcmds. (Section 3.13) n''Fcommands' If n is false, execute the enclosed commands. (Section 3.13) If n is ""successful'', execute the enclosed (Section 3.13) If n is ""unsuccessful'’, execute the enclosed (Section 3.13) n'* Acommands' n''Vcommands' n''Wcommands' ' n''Scommands’ n''Ucommands' commands. enclosed commands. enclosed commands. ] commands. commands. Q-REGISTER nUi Store the integer n in Q-register i. (Section 3.14) Qi Equal to the value stored in Q-register i. (Section 3.14) Increment the value in Q-register i by 1 (Section 3.14) Store, in Q-register i, all characters from (Section 3.14) Store the m+1st through nth characters in (Section 3.14) Place the text in Q-register i at the current . (Section 3,14) Execute the text in Q-register i as a command (Section 3.14) Push the current contents of Q-register i onto (Section 3.14) Pop the last stored entry from the Q-register (Section 3.14) (As first command in a string.) Save the (Section 3.14) %i nXi m,nXi “|Gi Mi [i 1i *j and return this value. the current pointer position to the beginning of the nth line from the pointer. Q-register i. pointer position. string. the Q-register pushdown list. pushdown list into Q-register i. preceding command string in Q-register i. - 352 TECO Table C-1 (Cont) Command Description Reference Function Commond SPECIAL NUMERIC VALUES The ASCII value (decimal) of the character (Section 3.16) @) or te The form feed flag. Equals O if no form feed character was read on the last input, =1 otherwise. (Section 3.16) ) or N The end-offile flag; equals -1 if end of input file seen on last input. Otherwise equals 0. (Section 3.16) tF or @ Decimal value of the console data switches. (Section 3.16) @ or tH The time of day in 60th's of a second. (Section 3.16) The value of the type-out mode switch. Equals 0 for normal type-out, -1 otherwise. (Section 3.16) Value of the search mode flag. (O=either case mode, -1= exact mode.) (Section 3.11) EU The value of the EU flag. +1 = flag upper case characters. 0 = flag lower case characters, -1 = no case flagging on typeout. (Section 3.6) EO The value of the EO flag. EH The value of the EH flag. 1= code only, 2= code plus one line, 3= all of error message. (Section 5.2) Equivalent to the ASCII value (in decimal) (Section 3.16) Equivalent to the decimal value of the digit string following the pointer. (Section 3‘. 16) Stop command execution and then take on the ASCI!I value (in decimal) of the (Section 3.16) 1A ET @ or tX @ x or ttx D or 1T following the pointer. 1= version 21A, (Section 3.17) 2= versions 22 and 23. of the arbitrary character x following tt. character typed in by the user. AIDS When used after an error message, this causes a more detailed explanation of the error to be (Section 5.2) When used of the beginning of a command string, this causes the entire command string (Section 5.2) typed. (with one of the two concluding altmodes) to be moved into Q-register i. TECO - 353 - Table C-1 (Cont) Command Description AIDS (Cont) ? When used after an error message, this causes (Section 5.2) Enter trace mode. A second ? command (Section 3.17) the offending command to be typed out (with a few of the commands preceding it). ? takes TECO out of trace mode. @ Erase last character typed in the command string. ' (Section 5.1) @ @ Erase the entire command string. (Section 5.1) @ Erase everything typed in back to the last (Section 5.1) @— Retype current line of command string. (Section 5.1) OEO Restore the EO value to standard. (Section 3.17) nEO (n#0) Set the EO value to n. (Section 3.17) 1EH Type only code part of error messages. (Section 5.2) 2EH Type error code plus one line. (Section 5.2) 3EH Type all three parts of error. (Section 5.2) OEH Equivalent to 2EH. break character. - (Section 5.2) TECO - 354 -
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies