Processing Character Data
Developing TACL Programs
107365 Tandem Computers Incorporated
2–13
Global Editing Commands
Use the commands in Table 2-2 to perform editing operations on the entire contents of
a variable or a range of lines within the variable.
Table 2-2. Global Editing Commands
Command
Description
VCHANGE
Changes all occurrences of one string to another string in a range of consecutive
lines in a variable. VCHANGE is not case-sensitive.
VCOPY
Copies a range of lines from one variable and inserts them at a given line position
in another variable.
VDELETE
Deletes a range of consecutive lines in a variable.
VFIND
Finds all lines containing occurrences of a specified string in a range of lines in a
variable. VFIND is not case-sensitive.
VINSERT
Inserts lines from the TACL IN file at a given line position in a variable.
VLIST
Lists a range of consecutive lines in a variable.
VMOVE
Deletes a range of lines from one variable and inserts them at a given line position
in another variable.
Unlike the built-in functions, the commands in Table 2-2 do not return a result.
Instead, each of these commands (except VINSERT) lists the lines it operates on, with
sequence numbers, to either the TACL OUT file or another user-specified file. You can
append copies of the lines to an existing variable.
To use these commands, specify a range of line numbers or all of the lines in the
variable (the default). If you use these commands to search for text or change text, the
process is not case-sensitive; TACL performs the operation on all instances of the text.
To specify a case-sensitive text change, use a line-editing or character-editing function,
listed in Table 2-1.
The following code reserves the name of a variable called
sample2
:
12> #PUSH sample2
(The variable is initialized as soon as you store data in it.)
To insert several lines into the variable, starting at line 1, enter:
13> VINSERT sample2 1
1 The name of this variable is "sample2."
2 There are 37 characters in this line.
3 This is the last line in the variable.
To terminate input, type CTRL/Y (or a line that contains two slashes—//).