Text Executive Programming Language
Encyclopedia
In 1979, Honeywell Information Systems announced a new programming language for their time-sharing
Time-sharing
Time-sharing is the sharing of a computing resource among many users by means of multiprogramming and multi-tasking. Its introduction in the 1960s, and emergence as the prominent model of computing in the 1970s, represents a major technological shift in the history of computing.By allowing a large...

 service named TEX, an acronym for the Text Executive processor. TEX was a first generation scripting language, developed around the time of AWK and used by Honeywell initially as an in-house system test automation tool.

TEX extended the Honeywell Time-Sharing service (TSS) line editor with programmable capabilities which allowed the user greater latitude in developing ease-of-use editing extensions as well as write scripts to automate many other time-sharing tasks formerly done by more complex TSS FORTRAN programs.

Overview

TEX was a subsystem of Honeywell TSS. Users would enter the TSS command 'tex' to change to a TEX session mode of operation. TEX expressions could be entered directly on the command line or run from script file via the TEX command CALL .

TEX programs are a collection of TSS line editing commands, TSS session commands and TEX statements. TEX variables could be inserted into TSS commands and TSS line editor commands via the TEX variable substitution feature. TEX programs were primarily designed to extend the line editor system. Consequently, TEX had no concept of file input/output relying instead on applying line edit commands to the working file and saving as needed.

The key developers of TEX at Honeywell were Eric Clamons and Richard Keys with Robert Bemer, famous as the father of ASCII and grandfather of COBOL, acting in an advisory capacity.

TEX should not be confused with TeX
TeX
TeX is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as ....

 a typesetting markup language invented by Donald Knuth
Donald Knuth
Donald Ervin Knuth is a computer scientist and Professor Emeritus at Stanford University.He is the author of the seminal multi-volume work The Art of Computer Programming. Knuth has been called the "father" of the analysis of algorithms...

.

The American Mathematical Society
American Mathematical Society
The American Mathematical Society is an association of professional mathematicians dedicated to the interests of mathematical research and scholarship, which it does with various publications and conferences as well as annual monetary awards and prizes to mathematicians.The society is one of the...

 has also claimed a trademark
Trademark
A trademark, trade mark, or trade-mark is a distinctive sign or indicator used by an individual, business organization, or other legal entity to identify that the products or services to consumers with which the trademark appears originate from a unique source, and to distinguish its products or...

 for TeX, which was rejected, because at the time this was tried (early 1980s), “TEX” (all caps) was registered by Honeywell
Honeywell
Honeywell International, Inc. is a major conglomerate company that produces a variety of consumer products, engineering services, and aerospace systems for a wide variety of customers, from private consumers to major corporations and governments....

 for the “Text EXecutive” text processing system.

Variables

All variables were stored as strings and converted to integer numeric values when required. Floating
point variables, arrays or other datatypes common in current scripting languages did not exist in a TEX environment.

All variables were stored in a single global variable pool which users had to manage in order to avoid
variable naming conflicts. There were no variable scoping capabilities in TEX. Variable names were limited to 40 characters.

TEX provided several internal read-only registers called star functions or star variables which changed state when certain TEX string parsing operations were executed. Star functions provided a means to get the current date and time, resultant strings from a split or scan string parsing operations, TEX internal call level and TSS session information.

The maximum length of a string value was 240 ASCII characters. This includes intermediate results when evaluating a TEX expression. Numeric string values are limited to 62 digits in the string including the (-) for negative numbers. Numeric values are also normalized where leading zeros are stripped from the string representation.

Some examples of variable usage:

_ we can use quotes or other characters as delimiters as long as the string doesn't contain them
a="hello"

_ here we use the / character as a delimiter (a common practice especially if the string has a " char)
b=/world/

_ here we are concatenating strings together via the comma concatenation operator
c=a,/ /,b

_ the out statement will print "hello world" to the terminal without the quotes
out:c

_ here we use a TEX variable in a line editing command to find a line starting with "hello world"
hello="hello world"
f:hello

_ here we are replacing the "hello" string with the "hello world" string
rs:a:c

Operators

TEX has three types of operators:
  • arithmetic
  • boolean
  • string

When constructing a TEX expression, all spaces must be compressed out except for string literals. In general,spaces
delimit TEX statements.

_ in the "d=" statement there are no spaces between the commas or the variables

a="hello" b=" " c="world" d=a,b,c out:d

_ the space separates the 'if' from the expression and the expression from the next TEX command to conditionally execute

if a:eqs:"hello" out:a

Arithmetic

TEX supports only basic integer arithmetic operations:
  • unary sign number prefix (+/-)
  • addition (+),
  • subtraction (-),
  • multiplication (*) and
  • division (/)


with up to 16 levels of parentheses.

Some examples are:

a=1

b=-2

c=3*(a-b)/(2*2+(4+1))

Boolean operators

TEX boolean operators come in two flavors for:
  • numeric comparisons
  • string comparisons

They were most often used within the context of an IF control statement.

A list of available numeric boolean operators in TEX are:
  • :eq: or :eqn: returns t for true if two values are numerically equal
  • :ge: or :gen: returns t for true if first value is numerically equal to or greater than second value
  • :le: or :len: returns t for true if first value is numerically equal to or lesser than second value
  • :gt: or :gtn: returns t for true if first value is numerically greater than second value
  • :lt: or :ltn: returns t for true if first value is numerically lesser than second value
  • :ne: or :nen: returns t for true if first value is not numerically equal to the second value


A list of available string boolean operators are:
  • :eqs: returns t for true if two strings values are identical in characters, case and length
  • :ges: returns t for true if first string is greater than or equal to the second string in characters case and length
  • :les: returns t for true if first string is less than or equal to the second string in characters case and length
  • :gts: returns t for true if first string is greater than or equal to the second string in characters case and length
  • :lts: returns t for true if first string is less than to the second string in characters case and length
  • :nes: returns t for true if first string is NOT equal to the second string in characters case and length


String boolean operators are affected by the TEX CASE mode. Under CASE mode, strings such as 'ABC' and 'abc' were considered equal (TEX converted 'ABC' to 'abc' prior to the comparison). Under NOCASE mode, the 'abc' string would be considered greater than the 'ABC' string based on the ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 code point value for 'a' being a larger value than the 'A' ASCII code point value.

The boolean NOT operator was represented by the circumflex character (^).

Some examples of boolean operators in action:

if name:eqs:"luke" out:"May the force be with you!"

if ^age:gtn:500 out:"Heh, you can't be Yoda!"


TEX did not provide and or or connecters to make more complex boolean expressions. Instead, programmers had to use nested if statements for and connections and a block of if...do something statements to handle or connections:

_ an example of an and construct
if a:eqs:'a' if b:eqs:'b' goto !its_true
goto !its_false

_ an example of an or construct
if a:eqs:'a' goto !its_true
if b:eqs:'b' goto !its_true
if c:eqs:'c' goto !its_true
goto !its_false

!its_true out:"Its true!" goto !next_block
!its_false out:"Its false!" goto !next_block

!next_block
...do something...

String operators

String concatenation in
TEX was provided by the comma operator:

a="hello"," "," world"

TEX provided several string splitting operators:
  • splitting a string from the left and saving the left side ('])
  • splitting a string from the left and saving the right side (]')
  • splitting a string from the right and saving the left side ('[)
  • splitting a string from the right and saving the right side ([')


Some string splitting examples:

a="hello world"

b=a']5

c=a]'5

out:"It's a strange new ",c," but ",b," anyways!"


TEX provided several string scanning/parsing operators:
  • scanning a string from the left for a given substring and saving the left side ('>)
  • scanning a string from the left for a given substring and saving the right side (>')
  • scanning a string from the right for a given substring and saving the left side ('<)
  • scanning a string from the right for a given substring and saving the right side (<')


Some string scanning/parsing examples:

a="hello world"

b=a'>" "

out:b

Labels

All TEX statement labels were prefixed with a (!). Statement labels were in general ignored unless referenced by a goto or call statement. One notable feature of TEX was the ability to call or goto labels in other files. Coupled with the TEX SUBS mode meant that TEX could create new scripts via line editing, save and then call or goto labels in these scripts dynamically.

The
mypgm file:


!hello
out:"hello world"
return

!hello2
out:"hello world again"
exit

(end-of-file marker)


Calling by label example:

call /mycat/mypgm!hello


In the above example,
TEX would process the /mycat/mypgm file searching for the !hello label(*). TEX would continue processing the file until a return statement or exit statement was executed or end of file was reached.

Goto by label example:

goto /mycat/mypgm!hello2


In the next example,
TEX would process the /mycat/mypgm file searching for the !hello2 label(*). TEX would continue processing until an exit statement or end of file was reached. An error would be thrown if a return statement was executed and there were no CALLs active.

(*) TEX did not check for duplicate labels in the same file, consequently execution was unpredictable if present.

Substitutions

TEX provides the SUBS and NOSUBS commands to activate or deactivate variable substitution for subsequent TEX statements or TSS commands.


xx=/out:"Hello World"/

subs ?

?xx?

nosubs

?xx?


In the above example, the
xx variable contains a TEX output statement as its value. The subs command specifies that (?) is the substitution character for all future statements of the program. Upon processing the first ?xx? line, TEX will substitute in the out:"Hello World" command for ?xx? and then execute the resultant statement. The nosubs command turns off substitutions for subsequent statements and so TEX issues an error when it tries to execute the second ?xx? line.

Indirections

In addition to variable substitution,
TEX supported variable indirection. Variables prefixed with the underscore character (_) were considered to contain a variable name as their contents and so TEX would use indirection to get the value. TEX limited indirection to 64 levels to avoid possible looping.

As an example:

a="b"
b="c"
c="hello world"

_ here the out would print "hello world" to the terminal,
_ since
__a

_b

c and so the command became out:c.
out:__a

Input/output

Honeywell Timesharing sessions had a concept of the working file. To edit an existing file, you would first make it the working file via the
old command. To create a new file, you would first create it via the new command. Once changes were complete, you would either save (for new files) or resave the working file. Basically only one file could be open for editing at a time.

TEX programs were primarily designed to extend the line editor system. Consequently, TEX had no concept of file input/output relying instead on making changes to the working file via line edit commands and saving as needed.

However,
TEX did provide terminal-oriented input/output commands:
  • in -- print a prompt and pause until text is entered, storing it in the *in star variable
  • out -- print a message


A simple example using
in and out:

in:"What is your name?"

out:"Hi ",*in

Star variables and functions

TEX provided star variables as a means to access results or side-effects of TEX system functions or to represent ASCII terminal codes.

A list of
star variables follows:
  • *account - user account number associated with the current userid
  • *cl - the current line of the current file being edited
  • *lcl - the length of the *cl value
  • *clvl - current depth of calls
  • *date - current date in the form of YY-MM-DD
  • *eof - T if positioned after the last line of the current file or when there is no current file
  • *in - contains the last response to an in or int TEX command execution
  • *lin - length of *in
  • *left or *l - left string from scan or split command execution
  • *lleft or *ll - length of *left
  • *middle or *m - middle string from scan or split command execution
  • *lmiddle or *lm - length of *middle'
  • *right or *r - right string from scan or split command execution
  • *lright or *lr - length of *right
  • *null - represents the null string
  • *random - contains a randomly selected digit from 0 to 9
  • *rmdr - remainder of the last division operation
  • *snumb - system number of the last batch job run
  • *svmd - TEX commands to restore the TEX modes at the time of the last interfile call or goto
  • *sw00 to *sw35 - examines the TSS 36-bit switch word with 1 bit returning a T value and a 0 bit returning a F
  • *time - current time in hh:mm:ss always to the nearest second
  • *userid - current userid

Terminal codes

Terminal codes were mapped into star functions for easy reference in
TEX programs.
  • *nul - null
  • *soh - start of header
  • *stx - start of text
  • *etx - end of text
  • *eot - end of transmission
  • *enq - enquiry
  • *ack - acknowledge
  • *bel - bell
  • *bs - backspace
  • *ht - horizontal tab
  • *lf - line feed
  • *vt - vertical tab
  • *ff - form feed
  • *cr - carriage return
  • *so - shift out
  • *si - shift in
  • *del - delete
  • *dle - data link escape
  • *dc1 - device control 1
  • *dc2 - device control 2
  • *dc3 - device control 3
  • *dc4 - device control 4 (stop)
  • *nak - negative acknowledge
  • *syn - synchronous idle
  • *etb - end of transmission block
  • *can - cancel
  • *em - end of medium
  • *sub - substitute
  • *esc - escape
  • *fs - field separator
  • *gs - group separator
  • *rs - record separator
  • *us - unit separator

Commands

TEX was built on top of the TSS line editor as such line editor commands could be used within a TEX program. TEX programs may have:
  • TSS line editing commands
  • TEX commands
  • TEX mode commands
  • TSS system commands

Edit Commands

The general command format was:

verb:;;:


The could contain a range as in F:/hello/,/world/ to find all lines that start with the string "hello" and contain the string "world" too.

TEX provided standard line-based file editing commands:
  • P: print current line
  • F: move forward through the current file line by line
  • B: move backward through the current file line by line
  • A: append after the current line
  • I: insert before the current line
  • R: replace the current with the expression provided
  • D: delete the current line
  • copy: copy the current line
  • cut: copy and delete the current line
  • paste: paste what was cut or copied before the current line


Each command could be modified with a numeric repeat value or with an asterisk (*):
  • P;999: print next 999 lines from the current position
  • P;*: print all lines from the current position to the end of file
  • F;999: move forward 999 lines from the current position
  • F;*: move to the end of file
  • B;999: move backward 999 lines from the current position
  • B;*: move to the first line of the file

Commands can be further modified with a line matching string or expression:
  • F:/xxx/;999 move forward to the line beginning with 999th occurrence of /xxx/
  • B:/xxx/;999 move backward to the line beginning with 999th occurrence of /xxx/
  • I:/xxx/;999:/yyy/ insert line yyy before the next 999 lines beginning with /xxx/
  • R:/xxx/;999;/yyy/ replace the next 999 lines beginning with /xxx/ with the line /yyy/
  • D:/xxx/;999 delete the next 999 lines beginning with /xxx/

For string mode, an
S was added. Whenever /xxx/ was found within the line then the editwas applied:
  • FS:/xxx/;999 move forward to the 999th occurrence of the string /xxx/
  • IS:/xxx/;999:/yyy/ insert the string /yyy/ before the next 999 occurrences of /xxx/
  • RS:/xxx/;999:/yyy/ replace the next 999 occurrences of the string /xxx/ with /yyy/
  • DS:/xxx/;999 delete the next 999 occurrences of the string /xxx/

Lastly, the commands can be further modified with
V to turn on verify mode and with O to specify nth occurrence string mode:
  • RVO:/xxx/;99;999:/yyy/ replace the 999th occurrence of string /xxx/ with /yyy/ and repeat it 99 times


There are a few other lesser used editing commands:
  • mark - to include files within files when the .mark statement is found in the current or subsequently included files (recursive operation)
  • befl - insert before the current line (normally the "A" command was used to insert after the current line)
  • trul - truncate left most columns of the current file
  • trur - truncate right most columns of the current file

In all edit command formats, the /xxx/ or /yyy/ or 999 could be replaced with a TEX variable.In addition, the 999 value could be replaced with an asterisk (*) to denote all occurrences.

TEX commands

TEX did not provide commands for numeric or conditional looping or switch cases as is common in modern scripting languages. These had to be constructed using if, labels and goto commands. As an example to eliminate duplicate lines from a file, we would use:

!ELIM_DUPS a=*cl f;1
_
!NEXT_LINE if *eof out:"task complete" return

b=*cl if a:eqs:b d goto !NEXT_LINE

a=b f;1 goto !NEXT_LINE

TEX commands:
  • call !
  • clear - remove a named variable from the pool or use * to remove all variables
  • goto ! - goto the named file and label
  • ercall - call subroutine on error in the preceding command
  • ergoto ! - goto procedure on error in the preceding command
  • if - if conditional, the expression is of the form :op: where the op is one of the comparator ops mentioned earlier.
  • in: - print the expression and wait for input. Store input in the *in variable
  • int: - print the expression and wait for input specifically from the terminal. Store the input in the *in variable.
  • *null - no-input carriage return from the terminal, used to terminate insert mode in a TEX program. No other commands may be on the same line.
  • stop - stop the TEX program
  • _ - remarks line
  • return - return from a subroutine call
  • out: - print the expression to the terminal
  • outt: - force print the expression (and all prior output not yet flushed) to the terminal
  • scan:: - scan from left to right searching for and parse placing the results in *left, *middle, and *right star variables and if *match is T then a match was found.
  • scann:: - scan from left to right searching for and parse placing the results in *left, *middle, and *right star variables and if *match is T then a match was found. scann was limited to a single character or character class (*lc=lowercase alphabetic, *uc=uppercase alphabetic, *n=numeric, *a=alphabetic(*lc+*uc), *an=alphanumeric(*a+*n))
  • scanr:: - scan from right to left searching for and parse placing the results in *left, *middle, and *right star variables and if *match is T then a match was found.
  • scannr:: - scan from right to left searching for and parse placing the results in *left, *middle, and *right star variables and if *match is T then a match was found. scannr was limited to a single character or character class (*lc=lowercase alphabetic, *uc=uppercase alphabetic, *n=numeric, *a=alphabetic(*lc+*uc), *an=alphanumeric(*a+*n))
  • split:: - split at position starting from the beginning of placing the results in *left, *middle, and *right star variables
  • splitr:: - split at position starting from the end of placing the results in *left, *middle, and *right star variables
  • subs - activate subs mode where TEX will scan for pairs of , evaluating the expression and placing it in the line prior to executing the line. SUBS mode is turned off by NOSUBS
  • trace - activate trace mode where lines are displayed prior to being executed. Trace mode is turned off by NOTRACE
  • vari - display all variables and their values including the star variables

TEX modes

TEX modes defined how other TEX commands would operate. The *svmd variable contained the current state of all TEX modes in the form of TEX commands to restore the modes. Each mode had an inverse command to turn the mode off which could be done at any time.
  • subs / nosubs - activate subs mode where TEX will scan for pairs of , evaluating the expression and placing it in the line prior to executing the line.
  • trace / notrace - activate trace mode where lines are displayed prior to being executed.
  • case / nocase - convert all strings to lowercase prior to comparison operations
  • octl / nooctl - define the octal prefixing character (e.g. octl % and then rs:/BELL/:/%007/)
  • mask / nomask - define the mask character for matching against any character within a search string
  • cols / nocols - define the columns window that string searching are limited to searching

TSS commands

While beyond the scope of this article, the most commonly used TSS commands were:
  • NEW - new file (i.e. empty file / clears editor workspace)
  • OLD - old file brought into editor workspace
  • SAVE - save a new file (filename can't exist)
  • RESAVE - resave editor wokspace into an existing file

Example code

This code was excerpted from a TEX based Adventure game written by a team of Explorer Scouts from GE Post 635, Schenectady New York circa 1980. The Adventure game
Adventure game
An adventure game is a video game in which the player assumes the role of protagonist in an interactive story driven by exploration and puzzle-solving instead of physical challenge. The genre's focus on story allows it to draw heavily from other narrative-based media such as literature and film,...

 was the first of several popular online text-based adventure games available on the GE Timesharing service. The scouts decided to create their own adventure game using TEX. The original Adventure game used two word commands to navigate Colossal Cave
Colossal Cave Adventure
Colossal Cave Adventure gave its name to the computer adventure game genre . It was originally designed by Will Crowther, a programmer and caving enthusiast who based the layout on part of the Mammoth Cave system in Kentucky...

. The parser shown below handled simple two word commands like go west or move right and converted them into x,y deltas for positioning and directional orientation in the game.

Parsing the Adventure two word commands:

_ ...main body of program skipped here for brevity
_ where a call !init and repeated calls to !parser are done...

!init
_ force a clear screen on the televideo terminal
out:*esc,":"

_ clear program variables
rmdr=*null
del=0
dir="n"
xlocn=1 ylocn=1
return

_ _______________________________________________________________
_
_
_ The PARSER subroutine interprets your input commands and tries to
_ pre-process them prior to returning to your program.
_
_
!parser
qry=*cr,*lf,"-->" sntc=*null call !ask1
ergo !unkn_cmd verb=ans vdel=0 goto !$ans$_cmd
_
!walk_cmd del=2 call !move_to return
!run_cmd del=4 call !move_to return
!fly_cmd del=6 call !move_to return
!swim_cmd del=2 call !move_to return
!look_cmd msg="mlk" call !sense_to return
!listen_cmd msg="mli" call !sense_to return
!smell_cmd msg="msm" call !sense_it return
!touch_cmd msg="mto" call !sense_it return
!taste_cmd msg="mta" call !sense_it return
!cast_cmd call !cast_it return
!unkn_cmd return

!move_to call !ask3 if ans:eqs:*null goto !to_$dir$
ercall !to_same call !to_$ans$
_
!to_locn xlocn=xlocn+xdel ylocn=ylocn+ydel return
_
!to_f
!to_forward
!to_ahead
!to_same goto !to_$dir$
_
!to_b
!to_backward goto !inv_$dir$
_
!to_r
!to_right goto !rt_$dir$
_
!to_l
!to_left goto !lt_$dir$
_
!inv_south
!rt_northwest
!lt_northeast
!to_n
!to_north dir="n" xdel=0 ydel=del return
_
!inv_west
!rt_northeast
!lt_southeast
!to_e
!to_east dir="e" xdel=del ydel=0 return
_
!inv_north
!rt_southeast
!lt_southwest
!to_s
!to_south dir="s" xdel=0 ydel=-del return
_
!inv_east
!rt_southwest
!lt_northwest
!to_w
!to_west dir="w" xdel=-del ydel=0 return
_
!to_very vdel=vdel+1 goto !to_same
!to_fast del=del+vdel vdel=0 goto !to_same
!to_slow del=del-vdel vdel=0 goto !to_same

!sense_to call !ask3
ercall !to_same call !to_$ans$ msg=msg,dir call !msg return
_
_
_ _______________________________________________________________
_
!sense_it call !ask3
!sense_it_1 if ans:eqs:*null in:verb," what ???" ans=*in goto !sense_it_1
msg=msg,ans call !msg return
_
_
_ _______________________________________________________________
_
!msg i=1
!msg_1 ergo !msg_end out:$(msg,i)$ i=i+1 clear $(msg,i)$ goto !msg_1
!msg_end return

_
_ The ASK subroutines get yout terminal input and break it up depending
_ on the spaces.
_
!ask1 if rmdr:eqs:*null in:qry rmdr=*in sntc=*null
!ask2 if sntc:eqs:*null scan:rmdr:"." sntc=*l rmdr=*r]'1
!ask3 scan:sntc:" " ans=*l sntc=*r return

Rolling dice:

_
_
_ _______________________________________________________________
_
_ The DICE subroutine rolls the dice for you and returns the answer
_ in the variable called DICE.
_
_ Input to the DICE subroutine is via the DICE variable as shown below :
_
_ 1d6 - roll the 6-sided die once
_ 3d8 - roll the 8-sided die 3 times
_ d% - roll the 100-sided die once (percentage roll)
_
!dice if dice:eqs:"d%" dice="1d100"
scan:dice:"d" i=*l j=*r dice=0

!dice_1
k=*random if j:gt:9 k=k,*random
k=k/j dice=dice+*rmdr+1
i=i-1 if i:gt:0 goto !dice_1

clear i clear j clear k
return

Televideo screen codes:

_
_
_ The following routines allow you to easily draw pictures on the
_ the Televideo 950 terminal.
_
_ xyplot—positions the cursor
_
_ gr—turns graphics mode on
_
_ nogr—turns graphics mode off
_
_ clear—clears the screen
_
_ load—used by xyplot to load the xytbl
_
!xyplot
ercall !load xytbl=xytbl
cx=(xytbl]'(x-1))']1
cy=(xytbl]'(y-1))']1
out:*ESC,"=",cy,cx,z
return
_
_
!load
xytbl=" !",/"/,"#$%&'*+,-./"
xytbl=xytbl,"0123456789:;<=>?",*AT,"ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_"
xytbl=xytbl,"`abcdefghijklmnopqrstuvwxyz{|}~",*DEL
return
_
_
!gr nosubs
out:*ESC,"$" subs $
$*SVMD$ return
!nogr out:*ESC,"%" return
!clear out:*ESC,":" return

Notable features

The most notable feature in TEX was its SUBS mode allowing variable values to crossover and become executable code. It allowed a programmer to create new variables on the fly to be used in later TEX expressions in a LISP
Lisp
A lisp is a speech impediment, historically also known as sigmatism. Stereotypically, people with a lisp are unable to pronounce sibilants , and replace them with interdentals , though there are actually several kinds of lisp...

-like fashion. TEX also allowed programmers to create scripts on the fly via line editing, saving the content to file later to be executed as part of the current program using interfile call and goto statements. However, in most cases, these features were used to provide simple dynamic goto statements in code as seen in the Adventure game parser example. What other kinds of Artificial Intelligence
Artificial intelligence
Artificial intelligence is the intelligence of machines and the branch of computer science that aims to create it. AI textbooks define the field as "the study and design of intelligent agents" where an intelligent agent is a system that perceives its environment and takes actions that maximize its...

constructs could be developed were never fully explored.

An example of creating variables on the fly and then using them to do an interfile goto.

_ incorporate x,y,z into the global variable pool
cmd="x=1 y=2 z=3"
subs ?
?cmd?

_ next we modify mycat/mypgm_1_2 to say "hello world" we are writing some code to execute later in our script
old mycat/mypgm_1_2
r:*cl:/!label_3 out:'Hello World'/
resave mycat/mypgm_1_2

_ lastly we subs in x,y,z and then evaluate the goto mypgm_1_2!label_3 which does an interfile goto
goto mycat/mypgm_?x?_?y?!label_?z?


The TEX program above illustrates dynamic script creation and then execution via substitution, file editing and interfile gotos. In effect, programs writing programs were possible although seldom done. In the above example, the mycat/mypgm_1_2 file would be executed at label_3 printing out "hello world".
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK