<s>
In	O
1979	O
,	O
Honeywell	O
Information	O
Systems	O
announced	O
a	O
new	O
programming	O
language	O
for	O
their	O
time-sharing	B-General_Concept
service	O
named	O
TEX	B-Application
,	O
an	O
acronym	O
for	O
the	O
Text	O
Executive	O
text	O
processing	O
system	O
.	O
</s>
<s>
TEX	B-Application
was	O
a	O
first-generation	O
scripting	O
language	O
developed	O
around	O
the	O
time	O
of	O
AWK	B-Application
and	O
used	O
by	O
Honeywell	O
initially	O
as	O
an	O
in-house	O
system	O
test	O
automation	O
tool	O
.	O
</s>
<s>
TEX	B-Application
extended	O
the	O
Honeywell	O
Time-Sharing	B-General_Concept
service	O
(	O
TSS	O
)	O
line	O
editor	O
with	O
programmable	O
capabilities	O
,	O
which	O
allowed	O
the	O
user	O
greater	O
latitude	O
in	O
developing	O
ease-of-use	O
editing	O
extensions	O
as	O
well	O
as	O
writing	O
scripts	O
to	O
automate	O
many	O
other	O
time-sharing	B-General_Concept
tasks	O
formerly	O
done	O
by	O
more	O
complex	O
TSS	O
FORTRAN	O
programs	O
.	O
</s>
<s>
TEX	B-Application
was	O
a	O
subsystem	O
of	O
Honeywell	O
Timesharing	B-General_Concept
(	O
TSS	O
)	O
.	O
</s>
<s>
Users	O
would	O
enter	O
the	O
TSS	O
command	O
tex	B-Application
to	O
change	O
to	O
a	O
TEX	B-Application
session	O
mode	O
of	O
operation	O
.	O
</s>
<s>
TEX	B-Application
expressions	O
could	O
be	O
entered	O
directly	O
on	O
the	O
command	O
line	O
or	O
run	O
from	O
a	O
script	O
file	O
via	O
the	O
TEX	B-Application
command	O
call	O
.	O
</s>
<s>
TEX	B-Application
programs	O
are	O
a	O
collection	O
of	O
TSS	O
line	O
editing	O
commands	O
,	O
TSS	O
session	O
commands	O
,	O
and	O
TEX	B-Application
statements	O
.	O
</s>
<s>
TEX	B-Application
variables	O
could	O
be	O
inserted	O
into	O
TSS	O
commands	O
,	O
and	O
TSS	O
line	O
editor	O
commands	O
via	O
the	O
TEX	B-Application
variable	O
substitution	O
feature	O
.	O
</s>
<s>
TEX	B-Application
programs	O
were	O
primarily	O
designed	O
to	O
extend	O
the	O
line	O
editor	O
system	O
.	O
</s>
<s>
Consequently	O
,	O
TEX	B-Application
had	O
no	O
concept	O
of	O
file	O
input/output	O
relying	O
instead	O
on	O
applying	O
line	O
edit	O
commands	O
to	O
the	O
working	O
file	O
and	O
saving	O
as	O
needed	O
.	O
</s>
<s>
The	O
key	O
developers	O
of	O
TEX	B-Application
at	O
Honeywell	O
were	O
Eric	O
Clamons	O
and	O
Richard	O
Keys	O
with	O
Robert	O
Bemer	O
,	O
famous	O
as	O
the	O
father	O
of	O
ASCII	B-Protocol
and	O
grandfather	O
of	O
COBOL	O
,	O
acting	O
in	O
an	O
advisory	O
capacity	O
.	O
</s>
<s>
TEX	B-Application
should	O
not	O
be	O
confused	O
with	O
TeX	B-Application
a	O
typesetting	O
markup	O
language	O
invented	O
by	O
Donald	O
Knuth	O
.	O
</s>
<s>
The	O
American	O
Mathematical	O
Society	O
has	O
also	O
claimed	O
a	O
trademark	O
for	O
TeX	B-Application
,	O
which	O
was	O
rejected	O
because	O
at	O
the	O
time	O
this	O
was	O
tried	O
(	O
the	O
early	O
1980s	O
)	O
,	O
"	O
TEX	B-Application
"	O
(	O
all	O
caps	O
)	O
was	O
registered	O
by	O
Honeywell	O
for	O
the	O
"	O
Text	O
EXecutive	O
"	O
text	O
processing	O
system	O
.	O
</s>
<s>
Floating	O
point	O
variables	O
,	O
arrays	O
,	O
or	O
other	O
datatypes	O
common	O
in	O
current	O
scripting	O
languages	O
did	O
not	O
exist	O
in	O
a	O
TEX	B-Application
environment	O
.	O
</s>
<s>
There	O
were	O
no	O
variable	O
scoping	O
capabilities	O
in	O
TEX	B-Application
.	O
</s>
<s>
which	O
changed	O
state	O
when	O
certain	O
TEX	B-Application
string	O
parsing	O
operations	O
were	O
executed	O
.	O
</s>
<s>
Star	O
functions	O
provided	O
a	O
means	O
to	O
get	O
the	O
current	O
date	O
and	O
time	O
,	O
resultant	O
strings	O
from	O
a	O
split	O
or	O
scan	O
string	O
parsing	O
operation	O
or	O
from	O
TEX	B-Application
internal	O
call	O
level	O
and	O
TSS	O
session	O
information	O
.	O
</s>
<s>
The	O
maximum	O
length	O
of	O
a	O
string	O
value	O
was	O
240	O
ASCII	B-Protocol
characters	I-Protocol
.	O
</s>
<s>
This	O
includes	O
intermediate	O
results	O
when	O
evaluating	O
a	O
TEX	B-Application
expression	O
.	O
</s>
<s>
TEX	B-Application
has	O
three	O
types	O
of	O
operators	O
:	O
</s>
<s>
When	O
constructing	O
a	O
TEX	B-Application
expression	O
,	O
all	O
spaces	O
must	O
be	O
compressed	O
out	O
except	O
for	O
string	O
literals	O
.	O
</s>
<s>
In	O
general	O
,	O
spaces	O
delimit	O
TEX	B-Application
statements	O
.	O
</s>
<s>
String	O
boolean	O
operators	O
are	O
affected	O
by	O
the	O
TEX	B-Application
CASE	O
mode	O
.	O
</s>
<s>
Under	O
CASE	O
mode	O
,	O
strings	O
such	O
as	O
'	O
ABC	O
 '	O
and	O
'	O
abc	O
 '	O
were	O
considered	O
equal	O
(	O
TEX	B-Application
converted	O
'	O
ABC	O
 '	O
to	O
'	O
abc	O
 '	O
prior	O
to	O
the	O
comparison	O
)	O
.	O
</s>
<s>
Under	O
NOCASE	O
mode	O
,	O
the	O
'	O
abc	O
 '	O
string	O
would	O
be	O
considered	O
greater	O
than	O
the	O
'	O
ABC	O
 '	O
string	O
based	O
on	O
the	O
ASCII	B-Protocol
code	I-Protocol
point	O
value	O
for	O
'	O
a	O
 '	O
being	O
a	O
larger	O
value	O
than	O
the	O
'	O
A	O
 '	O
ASCII	B-Protocol
code	I-Protocol
point	O
value	O
.	O
</s>
<s>
TEX	B-Application
did	O
not	O
provide	O
and	O
or	O
or	O
connectors	O
to	O
make	O
more	O
complex	O
boolean	O
expressions	O
.	O
</s>
<s>
String	O
concatenation	O
in	O
TEX	B-Application
was	O
provided	O
by	O
the	O
comma	O
operator	O
:	O
</s>
<s>
TEX	B-Application
provided	O
several	O
string-splitting	O
operators	O
:	O
</s>
<s>
TEX	B-Application
provided	O
several	O
string	O
scanning/parsing	O
operators	O
:	O
</s>
<s>
All	O
TEX	B-Application
statement	O
labels	O
were	O
prefixed	O
with	O
a	O
(	O
!	O
)	O
.	O
</s>
<s>
One	O
notable	O
feature	O
of	O
TEX	B-Application
was	O
the	O
ability	O
to	O
call	O
or	O
goto	O
labels	O
in	O
other	O
files	O
.	O
</s>
<s>
Coupled	O
with	O
the	O
TEX	B-Application
SUBS	O
mode	O
meant	O
that	O
TEX	B-Application
could	O
create	O
new	O
scripts	O
via	O
line	O
editing	O
,	O
save	O
,	O
and	O
then	O
call	O
or	O
goto	O
labels	O
in	O
these	O
scripts	O
dynamically	O
.	O
</s>
<s>
The	O
mypgm.tex	O
file	O
:	O
</s>
<s>
In	O
the	O
above	O
example	O
,	O
TEX	B-Application
would	O
process	O
the	O
/mycat/mypgm.tex	O
file	O
searching	O
for	O
the	O
!	O
hello	O
label( *	O
)	O
.	O
</s>
<s>
TEX	B-Application
would	O
continue	O
processing	O
the	O
file	O
until	O
a	O
return	O
statement	O
or	O
exit	O
statement	O
was	O
executed	O
,	O
or	O
an	O
end-of-file	O
was	O
reached	O
.	O
</s>
<s>
In	O
the	O
next	O
example	O
,	O
TEX	B-Application
would	O
process	O
the	O
/mycat/mypgm.tex	O
file	O
searching	O
for	O
the	O
!	O
hello2	O
label( *	O
)	O
.	O
</s>
<s>
TEX	B-Application
would	O
continue	O
processing	O
until	O
an	O
exit	O
statement	O
or	O
end	O
of	O
file	O
was	O
reached	O
.	O
</s>
<s>
( *	O
)	O
TEX	B-Application
did	O
not	O
check	O
for	O
duplicate	O
labels	O
in	O
the	O
same	O
file	O
,	O
consequently	O
execution	O
was	O
unpredictable	O
if	O
present	O
.	O
</s>
<s>
TEX	B-Application
provides	O
the	O
SUBS	O
and	O
NOSUBS	O
commands	O
to	O
activate	O
or	O
deactivate	O
variable	O
substitution	O
for	O
TEX	B-Application
statements	O
or	O
TSS	O
commands	O
.	O
</s>
<s>
In	O
the	O
above	O
example	O
,	O
the	O
xx	O
variable	O
contains	O
a	O
TEX	B-Application
output	O
statement	O
as	O
its	O
value	O
.	O
</s>
<s>
line	O
,	O
TEX	B-Application
will	O
substitute	O
the	O
out	O
:	O
"	O
Hello	O
World	O
"	O
command	O
for	O
?	O
xx	O
?	O
</s>
<s>
The	O
nosubs	O
command	O
turns	O
off	O
substitutions	O
for	O
subsequent	O
statements	O
and	O
so	O
TEX	B-Application
issues	O
an	O
error	O
when	O
it	O
tries	O
to	O
execute	O
the	O
second	O
?	O
xx	O
?	O
</s>
<s>
In	O
addition	O
to	O
variable	O
substitution	O
,	O
TEX	B-Application
supported	O
variable	O
indirection	O
.	O
</s>
<s>
Variables	O
prefixed	O
with	O
the	O
underscore	O
character	O
( _	O
)	O
were	O
considered	O
to	O
contain	O
a	O
variable	O
name	O
as	O
their	O
contents	O
and	O
so	O
TEX	B-Application
would	O
use	O
indirection	O
to	O
get	O
the	O
value	O
.	O
</s>
<s>
TEX	B-Application
limited	O
indirection	O
to	O
64	O
levels	O
to	O
avoid	O
possible	O
looping	O
.	O
</s>
<s>
Honeywell	O
Timesharing	B-General_Concept
sessions	O
had	O
a	O
concept	O
of	O
the	O
working	O
file	O
.	O
</s>
<s>
TEX	B-Application
programs	O
were	O
primarily	O
designed	O
to	O
extend	O
the	O
line	O
editor	O
system	O
.	O
</s>
<s>
Consequently	O
,	O
TEX	B-Application
had	O
no	O
concept	O
of	O
file	O
input/output	O
relying	O
instead	O
on	O
making	O
changes	O
to	O
the	O
working	O
file	O
via	O
line	O
edit	O
commands	O
and	O
saving	O
as	O
needed	O
.	O
</s>
<s>
However	O
,	O
TEX	B-Application
did	O
provide	O
terminal-oriented	O
input/output	O
commands	O
:	O
</s>
<s>
as	O
a	O
means	O
to	O
access	O
results/side	O
-effects	O
of	O
TEX	B-Application
subsystem	O
functions	O
or	O
to	O
represent	O
ASCII	B-Protocol
terminal	O
codes	O
.	O
</s>
<s>
Terminal	O
codes	O
were	O
mapped	O
into	O
star	O
variables	O
for	O
easy	O
reference	O
in	O
TEX	B-Application
programs	O
.	O
</s>
<s>
TEX	B-Application
was	O
built	O
on	O
top	O
of	O
the	O
TSS	O
line	O
editor	O
,	O
as	O
such	O
line	O
editor	O
commands	O
could	O
be	O
used	O
within	O
a	O
TEX	B-Application
program	O
.	O
</s>
<s>
TEX	B-Application
programs	O
may	O
have	O
:	O
</s>
<s>
TEX	B-Application
provided	O
standard	O
line-based	O
file	O
editing	O
commands	O
:	O
</s>
<s>
In	O
all	O
edit	O
command	O
formats	O
,	O
the	O
/xxx/	O
or	O
/yyy/	O
or	O
999	O
could	O
be	O
replaced	O
with	O
a	O
TEX	B-Application
variable	O
.	O
</s>
<s>
TEX	B-Application
did	O
not	O
provide	O
commands	O
for	O
numeric	O
or	O
conditional	O
looping	O
or	O
switch	O
cases	O
as	O
is	O
common	O
in	O
modern	O
scripting	O
languages	O
.	O
</s>
<s>
TEX	B-Application
commands	O
:	O
</s>
<s>
*	O
null	O
–	O
no-input	O
carriage	O
return	O
from	O
the	O
terminal	O
,	O
used	O
to	O
terminate	O
insert	O
mode	O
in	O
a	O
TEX	B-Application
program	O
.	O
</s>
<s>
subs	O
–	O
activate	O
subs	O
mode	O
where	O
TEX	B-Application
will	O
scan	O
for	O
pairs	O
of	O
<subs_characters>	O
,	O
evaluating	O
the	O
expression	O
and	O
placing	O
it	O
in	O
the	O
line	O
prior	O
to	O
executing	O
the	O
line	O
.	O
</s>
<s>
TEX	B-Application
modes	O
defined	O
how	O
other	O
TEX	B-Application
commands	O
would	O
operate	O
.	O
</s>
<s>
The	O
*	O
svmd	O
variable	O
contained	O
the	O
current	O
state	O
of	O
all	O
TEX	B-Application
modes	O
in	O
the	O
form	O
of	O
TEX	B-Application
commands	O
to	O
restore	O
the	O
modes	O
.	O
</s>
<s>
subs	O
/	O
nosubs	O
-	O
activate	O
subs	O
mode	O
where	O
TEX	B-Application
will	O
scan	O
for	O
pairs	O
of	O
,	O
evaluating	O
the	O
expression	O
and	O
placing	O
it	O
in	O
the	O
line	O
prior	O
to	O
executing	O
the	O
line	O
.	O
</s>
<s>
This	O
code	O
was	O
excerpted	O
from	O
a	O
TEX	B-Application
based	O
Adventure	B-Application
game	O
written	O
by	O
a	O
team	O
of	O
Explorer	O
Scouts	O
from	O
GE	O
Post	O
635	O
,	O
Schenectady	O
New	O
York	O
circa	O
1980	O
.	O
</s>
<s>
The	O
Adventure	B-Application
game	O
was	O
the	O
first	O
of	O
several	O
popular	O
online	O
text-based	O
adventure	B-Application
games	O
available	O
on	O
the	O
GE	O
Timesharing	B-General_Concept
service	O
.	O
</s>
<s>
The	O
scouts	O
decided	O
to	O
create	O
their	O
own	O
adventure	B-Application
game	O
using	O
TEX	B-Application
.	O
</s>
<s>
The	O
original	O
Adventure	B-Application
game	O
used	O
two	O
word	O
commands	O
to	O
navigate	O
Colossal	B-Application
Cave	I-Application
.	O
</s>
<s>
Parsing	O
the	O
Adventure	B-Application
two	O
word	O
commands	O
:	O
</s>
<s>
The	O
most	O
notable	O
feature	O
in	O
TEX	B-Application
was	O
its	O
SUBS	O
mode	O
allowing	O
variable	O
values	O
to	O
crossover	O
and	O
become	O
executable	O
code	O
.	O
</s>
<s>
It	O
allowed	O
a	O
programmer	O
to	O
create	O
new	O
variables	O
on	O
the	O
fly	O
to	O
be	O
used	O
in	O
later	O
TEX	B-Application
expressions	O
in	O
a	O
LISP-like	O
fashion	O
.	O
</s>
<s>
TEX	B-Application
also	O
allowed	O
programmers	O
to	O
create	O
scripts	O
on	O
the	O
fly	O
via	O
line	O
editing	O
,	O
saving	O
the	O
content	O
to	O
file	O
later	O
to	O
be	O
executed	O
as	O
part	O
of	O
the	O
current	O
program	O
using	O
interfile	O
call	O
and	O
goto	O
statements	O
.	O
</s>
<s>
However	O
,	O
in	O
most	O
cases	O
,	O
these	O
features	O
were	O
used	O
to	O
provide	O
simple	O
dynamic	O
goto	O
statements	O
in	O
code	O
as	O
seen	O
in	O
the	O
Adventure	B-Application
game	O
parser	O
example	O
.	O
</s>
<s>
What	O
other	O
kinds	O
of	O
Artificial	B-Application
Intelligence	I-Application
constructs	O
could	O
be	O
developed	O
were	O
never	O
fully	O
explored	O
.	O
</s>
<s>
goto	O
mycat/mypgm_	O
?	O
x	O
?	O
_	O
?	O
y	O
?.	O
tex	O
!	O
label_	O
?	O
z	O
?	O
</s>
<s>
The	O
TEX	B-Application
program	O
above	O
illustrates	O
dynamic	O
script	O
creation	O
and	O
then	O
execution	O
via	O
substitution	O
,	O
file	O
editing	O
and	O
interfile	O
goto	O
.	O
</s>
<s>
In	O
the	O
above	O
example	O
,	O
the	O
mycat/mypgm_1_2.tex	O
file	O
would	O
be	O
executed	O
at	O
label_3	O
printing	O
out	O
"	O
hello	O
world	O
"	O
.	O
</s>
