% -*-LaTeX-*-
% <BEEBE.EPSILON>TECOHOW.LTX.5, 27-May-86 18:31:37, Edit by BEEBE
% This is part of TECO.LTX

  Until now, I have intentionally refrained from showing you any
examples of what \TECO{} looks like, and I only hinted in the last
section that it might be hard to write.  Before we go into this, it
is important to understand why \TECO{} looks like it does.  Remember
that the original \TECO{}'s were developed to run on very small
machines, with perhaps as little as 4K words of memory for the
complete editor and its text buffers, in a time when even small
computers cost  a great deal.  {\em Efficiency} of interpretation was
therefore paramount.

   The syntax of \TECO{} is such that it can be interpreted in
{\em one} pass, looking at {\em one} character at a time, and
with {\em zero} lookahead.  This essentially means that each text
character is assigned a function, and while \T{C} for {\em
character forward}, \T{D} for {\em character delete}, and \T{S}
for {\em search} are mnemonic enough, the supply of such
connections is limited, and the early \TECO{}'s ended up with
things like \T{"} for {\em if} and \T{O} for {\em goto}, with
perhaps 30 to 50 characters given \TECO{} significance.  \ETECO{}
grew even more, using up almost all 128 ASCII characters.
Several of these act as escape mechanisms to access extended
functions defined by multi-letter words, like
\T{FS\VS{}ECHO\VS{}ACTIVE}.\footnote{\TECO{} program examples
will be given in typewriter text, and a space in such text will
be marked as \VS{} so that it is visible.} You can see,
however, that this binding of single characters to functions
makes for an efficient implementation---the interpreter just
keeps a table of 256 function names which it dispatches through,
based on the value of the next input character.

   At this point, you may be ready to throw up your hands in
despair and say ``I'll never learn or remember such nonsense!''.
Don't give up yet---without expending great effort, you can learn
a small and manageable subset of \TECO{} which will handle many
editing jobs.  Later, if your editing requirements expand, you
can learn more.  One of the goals of this document is to present
\TECO{} to you in such a way as to help you understand how it
works and why, and then to guide you to the most useful parts of
it to learn first.  You will find a tiny subset outlined in
the section beginning on page~\pageref{tiny-teco}.
