ssss77776666((((1111)))) ssssaaaammmm77776666 ((((NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999988888888)))) ssss77776666((((1111)))) NNNNAAAAMMMMEEEE s76 - ssssaaaammmm777766668TTTTMMMM9 language (high level interpreter) SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS s76 [samfile] or cat textfile | s76 -p[ -b] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN The ssssaaaammmm77776666 language is a high level language which evolved from Christopher Strachey's GPM (General Purpose Macro Generator) and Doug McIlroy's M6 language which used to be part of the standard UNIX distribution. The current M4 is a small subset of M6 with a different syntax. This language has more than two hundred resident functions whose names are represented by two or three alphabetic mnemonics. Typical expression, using the "S" syntax, to add two numbers is %ad,1234,5678/={6912}. The equivalent expression in the "M" syntax is #ad,1234,5678:={6912}. In the foregoing examples the expression is bounded by the [% and /] or [# and :] signs, the mnemonic aaaadddd represents _a_d_d, and the equal sign serves to activate the process yielding the value 6912 shown for illustration between curly braces. The major difference in using either the "S" or the "M" syntax is that when the "S" syntax is used, the resident function table is first examined for the command name found in the first argument, and then the user defined list, while if the "M" syntax is used, search is performed first in the user defined table, then in the resident function table. Invocation without any arguments merely starts up the interpreter, this is indicated by a prompt which consists only of a nuline. Invocation with a ssssaaaammmm77776666 language created script file, whose name is terminated with the .sam file type (eg.: hanoi.sam). The .sam is not used in the invocation eg: s76 hanoi is the correct way of starting. If the .sam file contains a "text" whose name is "A", then execution of that script file will start with the execution of the "text" named A, otherwise the named file, if it exists, will still be brought in and the interpreter will start as if no arguments had been provided, then the user may investigate as follows: %lt, /= _l_i_s_t_s the names of _t_e_x_t_s in memory %vt,%lt,!,///= _v_i_e_w_s the contents of all the named _t_e_x_t_s. Executable ssssaaaammmm77776666 language scripts may be piped through the interpreter: cat h.txt | s76 -p -b. Omitting the -b switch enables display of input text. Use of the function %sys,(shell or other commands)/ provides for interaction between the ssssaaaammmm77776666 language interpreter and Page 1 (printed 9/7/92) ssss77776666((((1111)))) ssssaaaammmm77776666 ((((NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999988888888)))) ssss77776666((((1111)))) other ****IIIIXXXX commands. Return to the operating system is either with a [CTRL-C] or through execution of the function %ex/. SSSSEEEEEEEE AAAALLLLSSSSOOOO ssssaaaammmm77776666....aaaasssscccc which is an updated reprint of the description of the language published in the McGraw Hill "Personal Computer Programming Encyclopedia" AAAAUUUUTTTTHHHHOOOORRRR Copyright (C) 1976 1986 1989 by Claude A. R. Kagan (...!att!sam76u!cark) Permission to use, copy, and distribute executable or runtime versions of this software for any purpose without fee is hereby granted, provided that the above copyright notice appear in all copies and that both copyright notice and this notice appear in supporting documentation of applications which make use of this language. This software is provided "as is" without express or implied warranty. Page 2 (printed 9/7/92)