TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-114
#DELTA Built-In Function
#DELTA 15> EOF!
11
#DELTA 16> v
#DELTA 16> EOF!
Test string(.)
When #DELTA is first invoked, the pointer points to the end of the buffer.
The X and Y Registers
As mentioned, you enter the operand values for a #DELTA command before entering
the command. When you enter the values, #DELTA stores them in two internal
registers named X and Y. When you first enter a value, it is stored in the X register.
The comma command (,) moves the X register value into the Y register and clears the
X register; you can then enter a new X register value. (If you enter another comma and
another new X register value, the first Y register value is lost.)
If a command returns one value, the value is stored in the X register. If a command
returns two values, they are stored in the X and Y registers; the individual command
descriptions indicate the register in which each value is stored. Commands that do not
return values clear the X and Y registers.
#DELTA has several shorthand commands for loading the X and Y registers. The B
command loads a 0 into the X register; 0 is the beginning of the buffer. The Z
command loads the number of characters in the buffer into the X register; thus, Z also
specifies the last position in the buffer. To type out the entire buffer, you can enter:
18> #DELTA This is a test string
#DELTA 19> b,zt
#DELTA 19> EOF!
This is a test string
#DELTA 20> EOF
#DELTA This is a test string expanded to:
This is a test string
“B,” in the preceding example loads zero into the Y register; “Z” loads the size of the
buffer into the X register. The H command does both of those functions. So B,Z T and
H T are equivalent.
The period command (.) loads the current pointer position into the X register. The
dollar sign command ($) clears the X and Y registers, as does a RETURN between
commands.
Specifying Ranges of Text
Many of the #DELTA commands operate on ranges of text. There are two ways you
can specify a range of text to these commands:
If you specify a range of text using an X register value with an empty Y register, the
range is the characters between the pointer position and x number of end-of-lines.
(EOLs) For example, 1T means type the rest of the current line (one EOL); 2T
means type the rest of the current line and the next line (two EOLs). A zero means