Text Executive Programming Language

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 writing scripts to automate many other time-sharing tasks formerly done by more complex TSS FORTRAN programs.

Floating point variables, arrays, or other datatypes common in current scripting languages did not exist in a TEX environment.

Star functions provided a means to get the current date and time, resultant strings from a split or scan string parsing operation or from TEX internal call level and TSS session information.

Under CASE mode, strings such as 'ABC' and 'abc' were considered equal (TEX converted 'ABC' to 'abc' prior to the comparison).

Instead, programmers had to use nested if statements for and connections and a block of if...do something statements to handle or connections: String concatenation in TEX was provided by the comma operator: TEX provided several string-splitting operators:[9] Some string-splitting examples:

One notable feature of TEX was the ability to call or goto labels in other files.

The nosubs command turns off substitutions for subsequent statements and so TEX issues an error when it tries to execute the second ?xx?

as a means to access results/side-effects of TEX subsystem functions or to represent ASCII terminal codes.

TEX did not provide commands for numeric or conditional looping or switch cases as is common in modern scripting languages.

While beyond the scope of this article, the most commonly used TSS commands were: 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 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: Rolling dice: Televideo screen codes:

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-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.

The TEX program above illustrates dynamic script creation and then execution via substitution, file editing and interfile goto.