%ì VAX-11 Librarian V04-00Y)²  ‘`„(´  ‘zÌ{5 Arithmetic† BranchingÎCommandsRÜ ConditionalsT&DeletionU¬Errorsd8Filese¼FlagsgÞHelpgöInitializationhD Insertionh„Loopsh¶MemoryiŒ Q-registersi2 QualifiersiÊ Release_notesi  SearchingyTECO ­à!:²  ‘ 1 ArithmeticF TECOC supports integer arithmetic. Expressions can beF constructed using numbers, operators, variables (q-registers) andF values maintained by TECO. Expressions are used to supply numericF values to TECO commands. The = command simply displays the value ofF it's numeric argument. Using it gives the TECO user a simple integerF calculator. Radix control is provided to allow the user to input andF output constants in octal, decimal or h exadecimal. Expressions areF evaluated left to right unless parentheses are used to alter theF order of execution. Parentheses may be nested. If parentheses areF used, the expression within innermost parentheses is evaluated first,1 left to right. There is no operator precedence. 2 Examples1 256*4=$$ will display 1024 on the screen/ 10*(4+3)ua$$ will put 70 into q-register a? qa=$$ will display the value stored in q-register aB qa*20=$$ wi ll display the value of q-register a, times 20J z=$$ will display the number of characters in the edit bufferI 0a==$$ will display the ASCII value of the character following1 the character pointer, in octal 2 OperatorsC The following operators are recognized by TECO in expressions( OPERATOR EXAMPLE FUNCTIONC + +2=2 Unary plus, not meaningful, but legal$ + 2+2=4 Addition2 - -2=-2 Unary minus, negation' - 8-6=2 Subtraction* * 2*3=6 Multiplication: / 8/3=2 Division with truncated result' & 12&10=8 Logical AND& # 12#10=14 Logical OR. ^_ 5^_=-6 Logical complement 2 Q-registersF Q-registers provide TECO with variables. Each q-register canD contain text and a numeric value. See "Q-REGISTERS" for more help.2 Radix_controlF TECO al lows the user to operate in octal, decimal orF hexadecimal. A current radix is maintained by TECO. Decimal is theF default radix. Numbers in command strings are interpreted accordingF to the current radix. The following commands alter the current radix.0 ^D change the current radix to decimal. ^O change the current radix to octal2 ^R return the value of the current radix2 n^R set the radix. n must be 8, 10 or 162 Special_va luesF The following commands return some kind of value. Help is* available on these commands individually.: nA next character ^F console switches9 B 0 n^F terminal number= ED edit level flag ^H current time of day: EH help level flag ^N end-of-file flag7 EO TECO version number ^R current radixB ES search verify flag ^S neg. size of last insert9 ET ty pe-out flag ^T next typed char: EU case flag ^X search mode flag< EV edit verify flag ^Y m,n of last insert@ Mq macro return value ^Z q-register memory used: Qq value in q ^^x ASCII value of x; Z number chars in buffer :Qq number chars in q@ ^B current date \ digit string in buffer< ^E form feed flag . position in buffer 2 Type-outF Ty pe-out of the value of an expression is provided through the =9 command. See "COMMANDS =" for help about the = command.ww­€T²  ‘ 1 BranchingF TECO provides conditional and unconditional branching in commandF strings. This capability provides much of the real power of the TECOF language. The following commands branch within a TECO command string:2 n"x if-then < begin loop0 | else > end loop9 ' e nd if F< goto same-level <9 $$ exit macro F> goto same-level >9 n$$ exit macro F| goto same-level |9 m,n$$ exit macro F' goto same-level '0 ; leave loop O goto tag5 n; leave loop nO computed goto= :; leave loop ^C stop now, give prompt6 n:; leave loop ^C^C terminate TECOww­-Z²  ‘ 1 CommandsF Almost all  TECO commands are terminated with two escape characters.2 ^AF The ^A command displays a string on the terminal. Text between? two ^A's is displayed. The ^A command can be @-sign modified. Examples:= ^APrompt^A$$ would display Prompt on the terminal screen< @^A:hello:$$ would display hello on the terminal screen2 ^BF The ^B command returns the current date via the following equations:; OS/8: ^B = (((month*32)+day)*8)+((year-1970)&7)+ k0 where k = 4096 if year>1977& and k=0 otherwise4 RT-11: ^B = (((month*32)+day)*32)+year-19727 RSTS/E: ^B = ((year-1970)*1000)+day within year2 RSX-11: ^B = ((year-1900)*16+month)*32+day2 VAX/VMS: ^B = ((year-1900)*16+month)*32+day8 TOPS-10: ^B = (((year-1964)*12+month-1)*31+day-1)2 ^CF The ^C command stops execution of TECO. It interrupts TECO andF returns control to the user. This command is usually us ed to stopF TECO when it is erroneously placed into an infinite loop. If thisF command is entered while a search is in progress, the character( pointer's position is not well defined.2 ^DF The ^D command sets the radix to decimal. This command isF equivalent to a 10^R command, when the curent radix is 10. See the@ documentation of the ^R command for a description of the radix.2 ^EF The ^E flag is the form feed flag. It is equivalent to -1 ifF the last pag e which was input was terminated by a form feed. If theF last page read was not terminated by a form feed (if it was the lastF page in the file or if the edit buffer filled up before the entireF page was read) then ^E is equivalent to 0. The ^E flag is tested byF the P command to determine whether a form feed should be appended to# the edit buffer when it is output.F ^E is also the prefix character for match control characters usedF within search strings. For help on match c ontrol characters, the2 help key is "SEARCHING MATCH_CONTROL_CHARACTERS".2 ^G^GF The ^G^G immediate command is actually an aid to type-in ofF command strings. When you type ^G^G, the command string is clearedF and you are given another prompt. When you type in a command stringF that has a mistake in it, and you notice the mistake before youF strike the ESCAPE-ESCAPE sequence that starts execution of theF command string, this aid can be used to clear the string so that youF can re-type it. This aid works a little differently than the ^U andF ^X aids. They clear only the current line of the command string, not the whole command string. 2 ^GF The ^G immediate command is actually an aid to type-in ofF command strings. When you type ^G and then a space, the current lineF of the command string is displayed. This is useful when you are on aF terminal that doesn't erase characters when the DELETE key is used.F On such a terminal, t yping in a command string and using DELETE toF fix it can leave the command string in an un-readable state on theF terminal. In such a case, ^G will re-display the current line of the command string.2 ^G*F The ^G* immediate command is actually an aid to type-in ofF command strings. When you type ^G and then an asterisk, the entireF current command string is displayed. This is useful when you are onF a terminal that doesn't erase characters when the DELETE key is used.F On such a terminal, typing in a command string and using DELETE toF fix it can leave the command string in an un-readable state on theF terminal. In such a case, ^G* will re-display the current command string.2 ^H@ The ^H (or BACKSPACE) command has two different functions.F When used as a normal command in a command string, the ^H= command returns the time of day via the following equations: OS/8: ^H = 0/ RT-11: ^H = (seconds sinc e midnight)/2+ RSTS/E: ^H = minutes until midnight/ RSX-11: ^H = (seconds since midnight)/2/ VAX/VMS: ^H = (seconds since midnight)/2A TOPS-10: ^H = 60ths of a second since midnight or 50ths of7 a second where 50 Hz power is usedF When used as an immediate-mode command (the first characterF typed after a TECO prompt) a BACKSPACE will cause TECO to immediatelyF move to the front of the previous line and type the line (like aF  -1L1T). The BACKSPACE immediate mode command together with theF LINE-FEED immediate mode command (which is like a 1L1T) provides aA convenient way to step from line to line within the edit buffer.2 ^IF The ^I (or TAB) command is the same as the I command, exceptF that the tab character is inserted along with the tab character.F This command is a useful alternative to the I command when a FORTRAN. or assembly language program is being edited.2 ^J@ The ^J (or L INE-FEED) command has two different functions.F When used as a normal command in a command string, the LINE-FEEDF character has no effect. It is meant to be used together with theF RETURN and SPACE commands to provide the TECO programmer with a way/ to indent and format TECO programs and macros.F When used as an immediate-mode command (the first characterF typed after a TECO prompt) a LINE-FEED will cause TECO to immediatelyF move to the front of the next line and type  the line (like a 1L1T).F The LINE-FEED immediate mode command together with the BACKSPACEF immediate mode command (which is like a -1L1T) provides a convenient6 way to step from line to line within the edit buffer.2 ^LF The ^L (or FORM-FEED) command performs no function in TECO. ItF echoes as a form feed and can be used to format command strings used in macros.F Form feed are what split pages in files. When TECO reads in aF page from an input file, a form fee d defines the end of the page.F Form feeds can be inserted into files like other characters. WhenF inserted, they reside in the edit buffer. When the file is outputF and TECO is used to edit the file later, the inserted form feeds terminate pages.2 ^MF The ^M (or RETURN) command performs no function in TECO. It can- be used to format command strings in macros.2 ^OF The ^O command sets the radix to octal. This command isF equivalent to a 8^R command, when the curent radix is 10. See theF documentation of the ^R command for a description of the radix. WhenF a control-O or caret-O is encountered in a comand string, it has theF above meaning. When a control-O is typed by the user, control-OF turns output to the terminal on or off. TECO still generatesF characters, it simply throws them away instead actually displayingF them. When a command is executed which results in a lot of uselessF output to a slow terminal, control- O can be used to speed things up& where control-C would stop execution.2 ^QF The ^Q command converts line positions in the edit buffer intoF the corresponding character positions. The n^Q command returns theF number of characters between the buffer position and the nth lineF terminator. The numeric argument can be positive or negative. For# example, n^QC is equivalent to nL.F Within string arguments, ^Q indicates that the next character isF to be used literally . For instance, Sttt^Q^Es$$ will search forE ttt^Es rather than ttt followed by a sequence of spaces and/or tabs.F The ^Q and ^S characters also control terminal i/o. The ^SF character will "freeze" output to the terminal and ^Q will allowF output to resume. This feature allows the user to temporarily stopF output to the screen so that text can be read before it scrolls off the top of the screen.2 ^RF The ^R command sets or returns the value of TECO's radix!. ToF set the radix, use n^R, where n is a number between 2 and 36,F inclusive. If ^R is used without a numeric argument, the currentF radix is returned. The value of the radix affects the execution ofF the =, :=, ==, :==, ===, :=== and \ commands. It also affects theF meaning of digit strings within command strings. If the radix is setF to a value above 10, parsing of command strings is affected. UpperF and lowercase letters become valid as "digits" in constants. " TheF meaning of commands strings can become very confusing, as lettersF intended to be commands are absorbed as part of constants. It isF recomended that bases higher than 10 be used only temporarily. If anF attempt is made to set the radix to a number that is out of range,F the IRA error message is produced. When TECO is started, the radix has a value if 10.2 ^SF The ^S command returns the length of the last string found orF inserted, multiplied by -1. It is inte #nded to be used in conjunctionF with other commands to manipulate the last string inserted or found. For instance,* Sabc$^SD$$ find and delete abc; Sabc$^SC$$ find abc and move to the front of itA GM$^SD$$ insert q-register M, then change your mindF The ^Q and ^S characters also control terminal i/o. The ^SF character will "freeze" output to the terminal and ^Q will allowF output to resume. This feature allows the user to temporari$ly stopF output to the screen so that text can be read before it scrolls off the top of the screen.2 ^T The ^T command...2 ^U The ^U command...2 ^V The ^V command...2 ^W The ^W command...2 ^X The ^X command...F The search flag. Additional help about how to manipulate flagsF can be found under the FLAGS keyword. This flag controls theF significance of case in searches. If this flag is 0, then case isF insignificant in sea%rch commands, and the command stext$$ would findF "Text", "text" or "TEXT" in the edit buffer. If this flag is -1,F then search commands are sensitive to case, and the command stext$$+ would only find "text" in the edit buffer.2 ^Y The ^Y command...2 ^Z The ^Z command...2 ^^X The ^^X command...2 !F In TECO, a tag is a string of characters enclosed in !F characters. A tag can be used as the destination of a branch (viaF the O command). &When TECO is executing sequentially and encounters aF tag, the tag is simply ignored. Tags also provide TECO's comment capability.2 "F The " command provides TECO's conditional branching capability,F or "if-then-else" construct. The two general forms of the " command are9 n"x' like "if x(n) then "G n"x|' like "if x(n) then else "F Where n is an expression and x is a conditional character. The 'F conditional characters determine how the value of the expression is% tested. Conditionals may be nested.3 "F Execute the following command string if the preceeding4 expression is greater than zero. E (quivalent to "G.3 "AF Execute the following command string if the preceedingF expression evaluates to a value that is the ASCII code for anF alphabetic character. Alphabetic characters are all upper case and lower case letters from A to Z.3 "CF Execute the following command string if the preceedingF expression evaluates to the ASCII code for a symbol constituent.F Symbol constituents are upper and lower case letters from A to Z,% digits, o)r periods and dollar signs.3 "DF Execute the following command string if the preceedingF expression evaluates to the ASCII code for a digit. Digits are 0 through 9.3 "EF Execute the following command string if the preceeding: expression is equal to zero. Equivalent to "=, "F or "U.3 "FF Execute the following command string if the preceedingF expression is FALSE. FALSE in TECO is 0. Equivalent to "=, "E or "U.3 "GF Execut *e the following command string if the preceeding4 expression is greater than zero. Equivalent to ">.3 "LF Execute the following command string if the preceeding; expression is less than zero. Equivalent to "<, "S or "T.3 "NF Execute the following command string if the preceeding! expression is not equal to zero.3 "RF Execute the following command string if the preceedingF expression evaluates to the ASCII code for an alphanumeric +character.F Alphanumeric characters are digits and the upper and lower case characters from A to Z.3 "SF Execute the following command string if the preceedingF expression is SUCCESSFUL. SUCCESSFUL in TECO is a value less than 0. Equivalent to "<, "L or "T.3 "TF Execute the following command string if the preceedingF expression is TRUE. TRUE in TECO is a value less than 0. Equivalent to "<, "L or "S.3 "UF Execute the following command ,string if the preceedingF expression was UNSUCCESSFUL. UNSUCCESSFUL in TECO is 0. Equivalent to "=, "E or "F.3 "VF Execute the following command string if the preceedingF expression evaluates to the ASCII code for a lower case letter from a to z.3 "WF Execute the following command string if the preceedingF expression evaluates to the ASCII code for a upper case letter from A to Z.2 %q The %q command...2 ' The ' command...2 *q-! The *q immediate command...2 . The . command...2 ; The ; command...2 < the < command...2 > The > command...2 = The = command...2 := The := command...2 ? The ? command...2 @ The @ command...2 AF The A command is used to append the next page of text from theF input file to the end of the current editing buffer. The command is of the form:7 A Read the next page of text from the input fil .e5 and append it to the end of the current text buffer2 B The B command... 2 BACKSPACEF The ^H (or BACKSPACE) command has two different functions. WhenF used as an immediate mode command (the first character typed after aF TECO prompt) it causes a -1L1T command string to be executed.F Together with the LINE-FEED immediate mode command, this provides aF convenient way to move through a file. When used as a normal commandF in a command string, /the ^H command returns the time of day via the following equations: OS/8: ^H = 0/ RT-11: ^H = (seconds since midnight)/2+ RSTS/E: ^H = minutes until midnight/ RSX-11: ^H = (seconds since midnight)/2/ VAX/VMS: ^H = (seconds since midnight)/2A TOPS-10: ^H = 60ths of a second since midnight or 50ths of7 a second where 50 Hz power is used2 CF The C command is used to move the pointer past a specified< number 0of characters. Common forms of the "C" command are:2 C Advance the pointer to the next character) 3C Move forward by three characters, -1C Move back to the previous character2 DF The D command is used to delete characters from the editing* buffer. Common forms of the command are:7 D Delete the character which follows the pointer2 5D Delete the next five characters, starting1 with the character following the pointer8 -1D Delete the ch1aracter which immediately precedes the pointer2 E% The E% command...2 E_ The E_ command...2 EA The EA command...2 EB The EB command...2 EC The EC command...2 EDF The edit level flag. Additional help about how to manipulateF flags can be found under the FLAGS keyword. Bits within this flag have the following meanings:. 1 Allow caret (^) in search strings: 2 Allow Y and _ commands to destroy edit buff 2er, 4 Don't arbitrarily expand memory- 16 preserve dot on failing searchesA 64 only move dot by one on multiple occurrence searches3 1F Allow caret (^) characters in search strings. If this bit is 1,F then the caret character is a normal character in search strings. IfF this bit is 0, then the caret character causes the immediatelyF following character in the search string to become a controlF character. It is useful to turn this bit off 3 when you are editing a# file with many control characters.3 2F Allow Y and _ commands, even if there is text in the editF buffer. If this bit is 1, the Y and _ commands will work, even ifF the edit buffer contains text. If this bit is 0, then the Y and _F commands will cause an error when the edit buffer contains text.F Note that this flag operates sensibly: it only aborts Y commands ifF an output file is defined. This flag is useful because it is veryF eas 4y to execute a Y command by mistake and irrevocably lose the contents of the edit buffer.3 4F Do not arbitrarily expand memory. If this bit is set, TECO willF expand memory in order to execute the A command. It will not expandF memory in order to execute the Y, P or N commands. If this bit isF clear, TECO will expand the edit buffer in order to fit entire pagesD into the edit buffer when the user execute an A, N, P or Y command.3 16F Preserve dot on failing search 5es. If this bit is 1, then when aF search fails, the character pointer is left pointing to the sameF place it was pointing before the search was attempted. If this bitF is 0, then when a search fails, the character pointer is left. pointing to the beginning of the edit buffer.3 64F Move the character pointer by one on multiple occurrenceF searches. This bit affects the way TECO handles the characterF pointer while executing a command like 5Stext$$. If th6is bit is 1,F then the character pointer is incremented each time the text stringF is found. If this bit is 0, then the character pointer is moved toF the end of the found text string each time the text string is found.F For example, suppose the text buffer contains 20 A's, the characterF pointer is currently pointing to the beginning of the edit buffer,F and the bit is 1. The command 5SAA$$ will complete leaving theF character pointer between the 6th and 7th characters (.=7$$ gives 6).F Under the same conditions, with the bit set to 0, the same commandF will complete leaving the character pointer between the 10th and 11th characters (.=$$ gives 10).2 EF2 EG2 EHF The help flag. Additional help about how to manipulate flagsF can be found under the FLAGS keyword. Bits within this flag have the following meanings:. 3 how much error message to display8 4 display failing command string after errors3 3F The two low bi8ts of the EH flag control how much information isF displayed when an error occurs. The bits can have the following values: 00 same as 105 01 display only the 3-letter error codeG 10 display 3-letter error code and one-line error messageI 11 display 3-letter error code, one-line error message and< a paragraph describing the error in detail.3 4F Output failing command string when an error occurs. I9f this bitF is 1, then the commands string that caused the error is displayed upF to and including the command that caused the error. This is justF like typing the immediate mode question-mark command after everyF error. If this bit is 0, then the failing command string is not typed.2 EI The EI command...2 EJ The EJ command...2 EK The EK command...2 EL The EL command...2 EM The EM command...2 EN The EN command...2 EP: The EP command...2 EQ The EQ command...2 ER The ER command...2 ESF The ES flag controls what is displayed on the terminal afterF every successful search command completes. By default, nothing is5 displayed (ES is 0). ES has the following meanings:( 0 don't display anything> -1 display the line containing the found string? 1-31 display the line containing the found string,< with a line feed ; at the character position? 32-126 display the line containing the found string,D with the character whose ASCII code is represented1 by ES at the character positionD m*265+n n has the meanings defined above. m is the numberA of lines above and below the found string to be displayed.2 ESCAPE The ESCAPE command...2 ETF The type-out flag. Additional help about how to manipulateF fla <gs can be found under the FLAGS keyword. Bits within this flag have the following meanings:3 1 inhibit conversions during type-out3 2 process DELETE and ^U in scope mode8 4 don't convert user's input to upper case0 8 read without echo on ^T commands% 16 cancel ^O on type-out0 32 read with no wait on ^T commands 128 mung mode* 256 truncate to terminal width! 512 terminal i =s a CRT+ 1024 terminal is a refresh scope 32768 trap ^C3 1F Type out in image mode. If this bit is 1, no conversions areF performed when text is typed out. If this bit is 0, TECOF automatically converts non-displayable character into a displayableF form before displaying them on the terminal. For instance, theF control-A character is converted to ^A and the ESCAPE character is converted to a dollar sign.3 2F Process DELETE a >nd ^U in scope mode. If this bit is set, theF DELETE and ^U commands will cause characters being deleted toF disappear from the terminal screen. If this bit is 0, then deletedF characters are simply echoed to the terminal screen and ^U simply advances to the next line.3 4F Read lower case. If this bit is 1, TECO will not convertF lowercase characters to uppercase on input. If this bit is 0, TECOD will convert lowercase characters typed by the user into up ?percase.3 8F Read without echo for ^T. If this bit is 1, ^T commands willF not echo. If this bit is 0, ^T commands will echo. This bit allowsA the user to explicitly echo input characters as he/she sees fit.3 16F Cancel ^O on type-out. If this bit is 1, TECO will cancel anyF outstanding control-O command before doing its output, thenF automatically clear the bit. If this bit is 0, TECO will output! normally, subject to ^O control.3 32F Read wit @h no wait. If this bit is 1, ^T commands will returnF immediately, regardless of whether there is a character in theF type-ahead buffer or not. If this bit is 1 and a ^T command isF executed and the type-ahead buffer is empty, the ^T will return a -1.F If this bit is 0 and a ^T command is executed and the type-aheadB buffer is empty, TECO will wait for the user to type a character.3 128F Mung mode bit. If this bit is 1, TECO executes as if it isF executing a A TECO program instead of interactively. If this bit is 1, then6 1. all informational message are suppressed9 2. ^C causes the immediate termination of TECO, 3. errors cause TECO to terminate If this bit is 0, then2 1. informational messages are displayed2 2. ^C returns the user to a TECO prompt5 3. errors return the user to a TECO prompt3 256F Truncate lines to terminal width. If this bit is 1, TECO willF truncat Be output lines to fit on lines of the terminal. If this bitF is 0, what happens to lines that are too long is determined by the! terminal and/or terminal driver.3 512F The terminal is a scope. If this bit is 1, the W command isF defined for CRT's (VT52, VT100, etc.). If this bit is 0, the W" command is not defined for CRT's.3 1024F The terminal is a refresh scope. If this bit is 1, then the WF command is defined for refresh terminals. If this bit is a 0, CthenF the terminal is not a refresh scope, and the W command is not defined for refresh scopes.3 32768F Trap ^C. If this bit is 1 and a ^C is typed, the bit is set toF 0 and execution of the current command string continues. This allowsF TECO macros to detect ^C's. If this bit is 0 and a ^C is typed, the$ user is returned to theTECO prompt.2 EUF The case flag. Additional help about how to manipulate flagsF can be found under the FLAGS keyword. This flag allows TECOD to beF used to input and output upper and lower case characters even if theF terminal being used is capable of displaying only uppercaseF characters. If the EU flag is 1, no case flagging is performed onF type-out. If the EU flag is 0, lowercase characters are converted toF uppercase on type-out, and are preceeded by a ' character. If the EUF flag is 1, then lowercase character are converted to uppercase onC type-out, but uppercase characters are preceeded by a ' character E.F The default value for this flag is -1. If TECO can tell (byF asking the operating system) that your terminal cannot support3 lowercase output, then it will set this flag to 0.2 EVF The EV flag controls what is displayed on the terminal afterF every successful command string completes. By default, nothing is5 displayed (EV is 0). EV has the following meanings:( 0 don't display anythingD -1 display the line containing the char Facter positionE 1-31 display the line containing the character position,< with a line feed at the character positionE 32-126 display the line containing the character position,D with the character whose ASCII code is represented1 by ES at the character positionD m*265+n n has the meanings defined above. m is the numberG of lines above and below the character position to be Gdisplayed.2 EW2 EXF The "EX" command is used to write the current buffer to theF output file, copy the remainder of the input file to the output file," and exit from TECO. For example, EX$$F (Note that the key echoes as "$" at your terminal, and that youD must type the key twice to cause the command to be executed.)2 EY The EY command...2 EZ The EZ command...2 F_ The F_ command...2 F' The F' command...2 F< The HF< command...2 F> The F> command...2 F| The F| command...2 FB The FB command...2 FC The FC command...2 FD The FD command...2 FK The FK command...2 FN The FN command... 2 FORM-FEEDF The ^L (or FORM-FEED) command performs no function in TECO. ItF echoes as a form feed and can be used to format command strings used in macros.F Form feed are what split pages in files. When TECO reads in aF page from an inp Iut file, a form feed defines the end of the page.F Form feeds can be inserted into files like other characters. WhenF inserted, they reside in the edit buffer. When the file is outputF and TECO is used to edit the file later, the inserted form feeds terminate pages.2 FR The FR command...2 FSF The FS command is used to replace one string with anotherF string. If the specified text is found, it is deleted and replacedF with the new text, and the pointer Jis positioned at the end of theF specified text. If the specified text is not found, the pointer is+ positioned at the beginning of the buffer.! The "FS" command is of the form:" FSold-textnew-textF For example, to replace the next occurrence of "exumple" with "example", use the command FSexumple$example$: (Note that the key echoes as "$" at your terminal.)2 Gq The Gq command...2 G* The G* command...2 G_ The G_ comKmand...2 H The H command...2 IF The I command is used to insert text, starting at the current& pointer. The command is of the form: Itext-to-insert7 For example, to insert the text "This is a test", type IThis is a test$D (Note that the key is echoed as a "$" sign at your terminal.)2 JF The J command is used to move the text pointer within the2 editing buffer. Common forms of the command are:- BJ Point to the beginning Lof the buffer' ZJ Point to the end of the buffer2 KF The K command is used to delete lines of text from the editing* buffer. Common forms of the command are:5 K Delete the text from the pointer through the end of the current line2 0K Delete the text from the beginning of the$ current line to the pointer5 5K Delete the next five lines of text, starting from the pointer5 HK delete all of the text in the editing buffer2 L MF The L command is used to move the text pointer from one line to+ another. Common forms of the command are:/ L Move to the beginning of the next line2 0L Move to the beginning of the current line5 5l Move to the fifth line past the current line' -1L Move back to the previous line 2 LINE-FEED@ The ^J (or LINE-FEED) command has two different functions.F When used as a normal command in a command string, the LINE-FEEDF character has no effect. NIt is meant to be used together with theF RETURN and SPACE commands to provide the TECO programmer with a way/ to indent and format TECO programs and macros.F When used as an immediate-mode command (the first characterF typed after a TECO prompt) a LINE-FEED will cause TECO to immediatelyF move to the front of the next line and type the line (like a 1L1T).F The LINE-FEED immediate mode command together with the BACKSPACEF immediate mode command (which is like a -1L1T) provOides a convenient6 way to step from line to line within the edit buffer.2 M The M command...2 NF The N command is the same as the "S" command, except that theF search continues across page boundaries, if necessary, until theF specified text, or the end of the file, is encountered. The "N" command is of the form: Ntext-to-locateF For example, to find the text "find me", which may appear on a later" page in the file, use the command Nfind Pme$9 (Note the the key echoes as "$" at your terminal.)2 O The O command...2 PF The P command is used to write the text in the editing buffer toF the output file and read the next page of text from the input file to6 the editing buffer. Common forms of the command are:4 P Write the current buffer to the output file and get the next page5 5P Write the current buffer, plus the next four7 pages from the input file, to the output file,4 Q then read the next page from the input file into the editing buffer2 Q The Q command...2 R The R command...2 RETURN# The ^M (or RETURN) command...2 SF The S command is used to locate a specified string of text inF the current buffer. If the text is found, the pointer is positionedF after the specified text. If the text is not found, an error messageF is printed and the pointer is set to the beginning of the buffer. The "S" command iRs of the form: Stext-to-locate9 For example, to find the text "find me", use the command Sfind me$: (Note that the key echoes as "$" at your terminal.)2 SPACE The SPACE command...2 TF The T command is used to type text from the editing buffer.% Common forms of the "T" command are:: T Type text from the pointer to the end of the line4 0T Type text from the beginning of the current line to the pointer4 5T Print theS next five lines of text, starting from the pointer8 HT Print the entire contents of the editing buffer2 TAB The ^I (or TAB) command...2 U The U command...2 V The V command...2 W The W command...2 Xq The Xq command...2 Y The Y command...2 Z The Z command...2 [ The [ command...2 \ The \ command...2 ] The ] command...2 | The | command...ww­€ `³  ‘1 ConditionalsF T The " command provides TECO's conditional branching capability,F or "if-then-else" construct. The two general forms of the " command are9 n"x' like "if x(n) then "G n"x|' like "if x(n) then else "F Where n is an expression and x is a conditional character. TheF conditional characters determine how the value of the expression is% tested. Conditionals may be nested.8 Additional help is avail Uable with TECO COMMANDS ".ww­»f³  ‘ 1 DeletionF The following list summarizes TECO's deletion commands.F Additional help is available individually on these commands using the help keyword COMMANDS.@ D delete the character following the character pointer? nD delete n characters following the character pointer@ -nD delete n characters preceeding the character pointer7 m,nD delete characters between positions m and n/ FDtext$ seVarch for and delete a text string# FRtext$ equivalent to ^SDItext$; K delete the line following the character pointer: nK delete n lines following the character pointer; -nK delete n lines preceeding the character pointer7 m,nK delete characters between positions m and n) HK delete the entire edit buffer7 FKtext$ delete all characters between here and textww­ðr³  ‘1 Errors- All TECO error messages are of the form ?XXWX Short text message$ and abort TECO's command execution.F Typing a question mark (?) immediately after TECO's input prompt willE print the erring command string up to and including the error point.F Typing a slash (/) immediately after TECO's input prompt will print a! longer explanation of the error.2 BNI ?BNI > not in iterationF There is a close angle bracket not matched by an open angle bracketF somewhere to its left. (Note: an iteration in a macro stored in a4 Q-registeXr must be complete within the Q-register.)2 CPQ ?CPQ Can't pop Q-regF A ] command has been executed and there is nothing saved on the Q-register push down list.2 DTB ?DTB Delete too bigF An nD command has been attempted which is not contained within the current page.2 ERR ?ERR ID, textF Some VAX/VMS system service call failed. The error message ID and text explain the error.$2 FNF ?FNF File not found "filespec"F The requested input file could not be located. Y If this occurredE within a macro the colon modified ER or EB command may be necessary.2 IAA ?IAA Illegal A arg6 The argument preceding a :A command is negative or 0.2 IEC ?IEC Illegal E characterF An invalid E command has been executed. The E character must beF followed by an alphabetic to form a legal E command (e.g., ER or EX).2 IFC ?IFC Illegal F character( An invalid F command has been executed.2 IIA ?IIA Illegal insert argF A command of the form "nItext$" was attZempted. This combination of) character and text insertion is illegal.2 ILL ?ILL Illegal command= An attempt has been made to execute an invalid TECO command.2 ILN ?ILN Illegal numberC An 8 or 9 has been entered when the radix of TECO is set to octal.2 IPA ?IPA Illegal P arg; The argument preceding a P or PW command is negative or 0.2 IQC ?IQC Illegal " character2 One of the valid " commands did not follow the ".2 IQN ?IQN Illegal Q-reg nameF An illegal Q-register nam[e was specified in one of the Q-register commands.2 IRA ?IRA Illegal radix arg9 The argument to a ^R radix command must be 8, 10, or 16.2 ISA ?ISA Illegal search argF The argument preceding a search command is 0. This argument must not be 0. 2 ISS ?ISS Illegal search stringF One of the search string special characters (^Q, ^R, etc.) would have7 modified the search string delimiter (usually ESCAPE).2 IUC ?IUC Illegal ^ characterF The character following an ^ must have AS\CII value between 100 and0 137 inclusive or between 141 and 172 inclusive.2 MEM ?MEM Memory overflowF Insufficient memory available to complete the current command. MakeF sure the Q-register area does not contain much unnecessary text.? Breaking up the text area into multiple pages might be useful.2 MRP ?MRP Missing )F There is a right parenthesis that is not matched by a corresponding left parenthesis.2 NAB ?NAB No arg before ^_F The ^_ command must be preceded by ei]ther a specific numeric argument+ or a command that returns a numeric value.2 NAC ?NAC No arg before ,F A command has been executed in which a , is not preceded by a numeric argument.2 NAE ?NAE No arg before =F The =, ==, or === command must be preceded by either a specific< numeric argument or a command that returns a numeric value.2 NAP ?NAP No arg before )F A ) parenthesis has been encountered and is not properly preceded byF a specific numeric argument or a comman^d that returns a numeric value.2 NAQ ?NAQ No arg before "F The " commands must be preceded by a single numeric argument on whichF the decision to execute the following commands or skip to the matching ' is based.2 NAS ?NAS No arg before ;F The ; command must be preceded by a single numeric argument on whichF the decision to execute the following commands or skip to the matching > is based.2 NAU ?NAU No arg before UF The U command must be preceded by either a _specific numeric argument+ or a command that returns a numeric value.2 NFI ?NFI No file for inputF Before issuing an input command, such as Y, it is necessary to open4 an input file by use of a command such as ER or EB.2 NFO ?NFO No file for outputF Before issuing an output command such as N search or P it isF necessary to open an output file by use of a command such as EW or EB.2 NYA ?NYA Numeric arg with YF The Y command must not be preceded by either a numeric `argument or a& command that returns a numeric value..2 OFO ?OFO Output file already open "filespec"F A command has been executed which tried to create an output file, butF an output file currently is open. It is typically appropriate to useF the EC or EK command as the situation calls for to close the output file."2 PDO ?PDO Push-down list overflow9 The command string has become too complex. Simplify it.2 POP ?POP Pointer off pageF A J, C or R command has been executed which aattempted to move theF pointer off the page. The result of executing one of these commandsF must leave the pointer between 0 and Z, inclusive. The charactersF referenced by a D or m,nX command must also be within the buffer boundary.2 SNI ?SNI ; not in iterationF A ; command has been executed outside of an open iteration bracket.= This command may only be executed within iteration brackets. 2 SRH ?SRH Search failure "text"F A search command not preceded by a colon modi bfier and not within anF iteration has failed to find the specified "text". After an S searchF fails the pointer is left at the beginning of the buffer. After an NF or _ search fails the last page of the input file has been input and,F in the case of N, output, and the buffer is cleared. In the case ofF an N search it is usually necessary to close the output file and! reopen it for continued editing.2 STL ?STL String too longF A search or file name string is too long. This is m cost likely the- result of a missing ESCAPE after the string.2 UTC ?UTC Unterminated commandF This is a general error which is usually caused by an unterminatedF insert, search, or filespec argument, an unterminated ^A message, anF unterminated tag or comment (i.e., unterminated ! construct), or aB missing ' character which closes a conditional execution command.2 UTM ?UTM Unterminated macroF This error is the same as the ?UTC error except that the unterminatedF command was d executing from a Q-register (i.e., it was a macro).F (Note: An entire command sequence stored in a Q-register must be! complete within the Q-register.)2 XAB ?XAB Execution abortedF Execution of TECO was aborted. This is usually due to the typing of CTRL/C.2 YCA ?YCA Y command abortedF An attempt has been made to execute an Y or _ search command with anF output file open, that would cause text in the text buffer to beF erased without outputting it to the output file e. The ED command controls this check.ww­`§º³  ‘1 FilesF TECO can maintain two input and two output files at the same- time. The following commands control files.8 EA secondary output stream EL open log file: EB open input and output EN wildcard lookupA EC copy and close EP secondary input stream: EF close output file ER open input file; EG EC with command string EW open output filfe6 EI indirect command file EX EC and exit EK close, delete output file7 The following commands input and output to/from files.1 A append page from input file to edit buffer EQq read file into Q-register EY yank without protection+ P output edit buffer, input next page1 Y yank page from input file into edit buffer9 Individual help is available for each of these commands.ww­€H³  ‘1 FlagsF Flags control the behavior ofg TECO. Changing these flagsB changes the way TECO executes. Flags are manipulated as follows:3 returns the value of the flag4 n set the value of the flag to n8 m,n turns off m bits, turns on n bits% 0,n turns on n bits& m,0 turns off m bits The flags are:: ED edit level flag ET type-out flag6 EH help level flag EU case flag= EO TECOh version number EV edit verify flag? ES search verify flag ^x search verify flagF Additional help is available for each individual flag using the COMMANDS help keyword.ww­ éɳ  ‘1 HelpF TECOC's HELP command allows you to get HELP from the TECOC helpF library or the default system library. To get help about TECOC fromF the TECOC library, just say "HELP". To get help from the default system library, say "HELP/S"ww­i€}γ  ‘1 Initialization TECO initialization...ww­ÀŠÑ³  ‘ 1 Insertion TECO insertion...ww­˜Ô³  ‘1 Loops Loops...ww­@¥×³  ‘1 MemoryF TECO automatically remembers the file being edited. The file'sF name is stored in a process logical called TEC$MEMORY. If you invokeF TECO without specifying a file-spec, TECO will read its memoryF logical and re-edit the last edited file. TECO's memory feature is1 completely jinhibited by the /NOMEMORY qualifier.ww­ 9ܳ  ‘ 1 Qualifiers Qualifiers...2 -c2 -d2 -m2 -p2 -rww­ Sâ³  ‘ 1 Q-registers Q-register...ww­à`å³  ‘1 Release_notes Release_notes...ww­Àôé³  ‘ 1 SearchingF TECO provides several ways to search for text strings. The editF buffer can be searched in a forward or backward direction. Files canF be searched in a forward direction. Within the edit buffer, the kareaF to be searched can be bounded. Search commands can return values soF that the success or failure of a search can control execution ofF macros. Special match control characters can be used in searchF arguments to allow pattern matching. Search commands can be modified by the @ character.F All search commands leave the character pointer positioned afterF the last character in the search string. Help is available) individually for the following commands: l; S edit buffer search FS search and replace@ N file search FN file search and replace: _ destructive file search FD search and delete2 Match_control_charactersF TECO supports special match control constructs in searchF strings. These constructs allow for special pattern matching. The constructs are= ^EA alphabetics ^EV lowercase= ^EB non-alphanumerics ^EW uppercas me< ^EC alphanumerics, . or $ ^EX anything= ^ED digits ^E octal nnn: ^EGq anything in q-register q ^E[a,b..] a,b...B ^EL LF, VT, FF ^Nx anything but xE ^EMx * of x ^S non-alphanumerics< ^ER alphanumerics ^X anything ^ES * of spaces, tabs3 ^EAF The ^EA match control construct indicates that any alphabeticF cha nracter is acceptable in this position. Alphabetic characters are- upper and lower case characters from a to z.3 ^EBF The ^EB match control construct indicates that any seperatorF character is acceptable in this position. Characters other thanF letters (a-z upper and lowercase) and digits are seperators. The ^EBF match control construct is the same as the ^S match control construct.3 ^ECF The ^EC match control construct indicates that any characterF o that is valid in a symbol name is acceptable in this position. TheF characters that are valid in symbol names are alphanumerics (letters% and digits), period and dollar sign.3 ^EDF The ^ED match control construct indicates that any digitC character is acceptable in this position. Digits are 0 through 9.3 ^EGqF The ^EGq match control contruct indicates that any character inF q-register q is acceptable in this position. For instance, ifF q-register q contai pns A, B and C, then A, B or C is acceptable in this position.3 ^ELF The ^EL match control construct indicates that any lineF terminator character is acceptable in this position. Line terminator6 characters are LINE-FEED, VERTICAL-TAB and FORM-FEED.3 ^EMxF The ^EMx match control construct indicates that any non-zeroF number of occurrences of x is acceptable in this position. x can beF another match control construct. For instance, ^EMZ will match Z, ZZ,q ZZZ, ZZZZ, etc.3 ^ERF The ^ER match control construct indicates that any alphanumericF character is acceptable in this position. Alphanumeric characters7 are letter (a-z upper or lower case) and digits (0-9).3 ^ESF The ^ES match control construct indicates that a non-null stringF of spaces and/or tabs is acceptable in this position. For instance, the following command string j$$F will trim all spaces and tabs off the end of lines of text in t rhe edit buffer.3 ^EVF The ^EV match control construct indicates that any lower case: alphabetic character (a-z) is accetable in this position.3 ^EWF The ^EV match control construct indicates that any upper case: alphabetic character (A-Z) is accetable in this position.3 ^EXF The ^EX match control construct indicates that any charater isF acceptable in this position. The ^X match control construct is the) same as the ^EX match control construct. 3 ^EsF The ^E match control construct indicates that the characterF that has octal code nnn is acceptable in this position. ThisF construct is useful for specifying characters in search strings thatF would cause unpleasant effects if they were antered directly.A Characters like NULL, DELETE and ESCAPE fall into this category.3 ^E[a,b,c...]F The ^E[a,b,c...] match control construct indicates that any ofF the characters a, b, c... are acceptable in this posittion. For instance, the command string sth^E[i,a]^E[s,t]$$2 would match "this" or "that" or "thit" or "thas".3 ^NxF The ^Nx match control construct indicates that any characterF except x is acceptable in this position. x can be a match control- construct. For instance, the command string s^N^E[a,b]$$> would match any character except lowercase a and lowercase b.3 ^SF The ^S match control construct indicates that any seperatorF character is accept uable in this position. Characters other thanF letters (a-z upper and lowercase) and digits are seperators. The ^SF match control construct is the same as the ^EB match control construct.3 ^XF The ^X match control construct indicates that any charater isF acceptable in this position. The ^X match control construct is the) same as the ^EX match control construct.2 String_building_charactersF It is sometimes helpful to be able to include characters withinF s vearch arguments that cannot be entered directly. The ESCAPEF character is a good example, as are ^C, ^Y and DELETE. TECO supportsF special string building constructs that allow special characters to be entered in search commands.3 ^QF The ^Q string build construct indicates that the characterF following the ^Q is to be used literally rather than as a matchF control character. The ^Q string build construct is the same as the ^R string build construct.3 ^RF w The ^R string build construct indicates that the characterF following the ^Q is to be used literally rather than as a matchF control character. The ^R string build construct is the same as the ^Q string build construct.3 ^VF The ^V string build construct indicates that the characterF following the ^V is to be used as the equivalent character in lower= case. For instance, ^VR would equal r in a search argument.3 ^V^VF The ^V^V string build construct xindicates that all charactersF following the ^V^V in the string are to be converted to lower case.F All characters in the string are converted up to the end of theF string or a ^W^W string build construct. The ^W string buildF construct can be used to override the ^V^V on a single-character basis.3 ^WF The ^W string build construct indicates that the characterF following the ^W is to be used as the equivalent character in upper= case. For instance, ^W yr would equal R in a search argument.3 ^W^WF The ^W^W string build construct indicates that all charactersF following the ^W^W in the string are to be converted to upper case.F All characters in the string are converted up to the end of theF string or a ^V^V string build construct. The ^V string buildF construct can be used to override the ^W^W on a single-character basis.3 ^EQqF The ^EQq string build construct that the string contained inB q-regis zter q is to be used in this position in the search string.3 ^EUqF The ^EUq string build construct indicates that that characterF whose ASCII code is contained in q-register q is to be used in this position in the search string.ww­`„(´  ‘1 TECOF TECO is a text editing program and a programming language. ItF allows the user to edit text interactively using simple, short (oneF or two letter) commands. The commands can be combined to form TECOF programs, or macros. These macros can be stored in files and@ executed by the user while in TECO or in a stand-alone fashion.+ Format: teco -c -d data -m -p -r filespecF The teco command needs to be defined as a foreign command in yourF LOGIN.COM file. The following lines illustrate how this can be done:& te*co :== $SYS$SYSTEM:TECOC) ma*ke :== $SYS$SYSTEM:TECOC -c) mu*ng :== $SYS$SYSTEM:TECOC -pww