Trailing-Edge
-
PDP-10 Archives
-
steco_19840320_1er_E35
-
10,5676/teco/manual/tecqrg.rnm
There is 1 other file named tecqrg.rnm in the archive. Click here to see a list.
.Chapter Q-registers
.HL1 Introduction
.entry ^Q-register
A Q-register is a temporary, named, data storage location.
These Q-register names may be a single character or
a long Q-register name delimited by parentheses. Note that a single
character Q-register name may optionally be enclosed by parentheses, but
denotes the same register. Due to the nature of TECO, references
to single character Q-registers are slightly quicker than long
Q-register names.
The data contained in Q-registers will be one of three possible data types:
Textual, numeric, or a "saved" FC command table.
For text storage, a Q-register can be used to hold character strings
of any length, and may have input and output files associated with them.
The text in a Q-register can be used in several different ways.
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.
Another use is to save text that is frequently used as TECO commands,
that will later be invoked by an "M" or "W" command, or to hold
a string argument for another command.
For numeric storage, a Q-register can be used to hold a single
signed integer number in the range -2**35 to 2**35-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.
.HL1 Single character
Single character Q-register names are A-Z, 0-9, *, and %.
.HL1 Multiple character
.INDEX ^Q-register >^Long name
Multiple character Q-register names may be used in the same places
as single character Q-register names. Long Q-register names are
delimited by parenthesis, and all characters, except a ")" may be
used in their name, even escapes are allowed.
The names of Q-register names are actually processed in the same
fashion as string arguments. This implies that _^A and _^B (or _^V and _^W)
may be used to control the upper and lower casing of the names. Additionally,
other commands such as _^G, _^R, _^T, etc_. are useful.
For example, the _^G_<single character Q-register name>$ capability may be used to reference a
Q-register indirectly, where the single character Q-register will contain
the name of a long Q-register name.
.b
Examples:
.lm+20.ts 20
.i -15;3X(Long Q-register name)
.i -15;M(_^GAroutine) ;If A contains "check", then the complete Q-register
name is "checkroutine"
.lm -20.ts
.HL1 Predefined Q-registers
TECO contains several predefined Q-registers. These Q-registers are used
for special purpose items. These items range from a Q-registers that gets
executed every n commands to a Q-register that contains the text of the
commands that are being typed in to TECO.
.HL2 AUTO-COMMAND
.index ^Q-register ><AUTO-COMMAND
This Q-register contains commands that are executed after every
'AUTO-COUNT' commands.
.HL2 AUTO-COUNT
.index ^Q-register ><AUTO-COUNT
The number contained by AUTO-COUNT is the number of complete commands
that are to be processed before the 'AUTO-BUFFER' Q-register is to be executed.
.INDEX ^Q-register ><AUTO-BUFFER
This number must be greater than zero for 'AUTO-BUFFER' to be executed.
A complete command is any command that terminates with two escape characters.
.HL2 COMMAND-BUFFER
.index ^Q-register ><COMMAND-BUFFER
This Q-register, which is also only needed by the E$ command, is the
.index ^Command ><E_$
predefined name for the section of the screen where typein will be echoed, and typeout printed.
.hl2 COMMAND-PROMPT
.index ^Q-register ><COMMAND-PROMPT
This Q-register contains the prompt text that TECO uses to prompt
the user. It can be changed to contain an arbitrary text string,
or the decimal value of an ASCII character.
.hl2 CONTROL-C-INTERCEPT-COMMAND
.INDEX ^Q-register ><CONTROL-C-INTERCEPT-COMMAND
The TECO commands in this Q-register will only be executed if the
user types a _^C. Note that this is different from a _^C command appearing
as part of a TECO command.
If no command which causes TECO to exit is used in this Q-register,
TECO will NOT return to monitor. For safety, several rapid _^Cs will always
exit. No command used here will cause EXIT-COMMAND to be executed.
An example, which also happens to illustrate a use of the
_^C (up-arrow C) command is:
.B;_^A[Monitor]_^A _^C _^A[TECO]_^A
.B
When a _^C is typed on the keyboard, [Monitor] is printed before TECO
exits. If the user then types the monitor command CONTINUE, [TECO]
will now be printed before TECO continues from where it was originally
interrupted.
.HL2 ERROR-TEXT
.index ^Q-register ><ERROR-TEXT
This Q-register will contain the complete text of the last error message.
Note that when TECO is in video mode (EVON$ command given), and this
.index ^Video mode
Q-register is displayed, TECO will not print out the error message in the
'COMMAND-BUFFER' section.
.index ^Q-register ><COMMAND-BUFFER
.HL2 EXIT-COMMAND
.index ^Q-register ><EXIT-COMMAND
The TECO commands stored in this Q-register will be executed
just before TECO returns to monitor except if TECO is returning
to monitor through a command in Q-register CONTROL-C-INTERCEPT-COMMAND.
This feature may be used, for example,
to set terminal parameters before exiting.
.HL2 TERMINAL-INPUT-BUFFER
.index ^Q-register ><TEXT-BUFFER
This Q-register contains text that has been read from the terminal but not
yet processed by TECO. All characters which are in this Q-register will
be read into the command buffer or processed as immediate commands
the next time TECO returns to command level. The contents of this
Q-register are normally indeterminate, unless the peek-ahead form
of the control-T
.index ^Command ><C<ontrol-^T
command has been used.
.HL2 TEXT-BUFFER
.index ^Q-register ><TEXT-BUFFER
This Q-register is used only for purposes of the E$ command. This is
.index ^Command ><E_$
a predefined name that always refers to the current editing buffer.
.HL2 Question mark ("?")
.index ^Q-register >?
This Q-register contains the last command in error. This allows the user
to still obtain the command in error if they forgot to star ("*")
.INDEX ^Command >*
the erroneous command into a Q-register for later.
.HL2 Period (".")
The normal editing buffer is preconnected to the "." Q-register.
.HL2 Asterisk ("*")
This Q-register is used as the default register for reading and writing
of files with the EP, EQ, and EI commands. If only the file specification
.index ^Command ><EI
.index ^Command ><EQ
.index ^Command ><EP
is given for these commands than the asterisk Q-register will be used for
the command.