

          s76 - 9 language (high level interpreter)


          s76 [samfile] or cat textfile | s76 -p[ -b]

   
          The 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 represents, 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 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, /=        lists the names of in memory

          %vt,%lt,!,///= views the contents of all the named texts.

          Executable 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 language interpreter and



     Page 1                                           (printed 9/7/92)



          other commands.

          Return to the operating system is either with a [CTRL-C] or
          through execution of the function %ex/.

          which is an updated reprint of the description of
          the language published in the McGraw Hill "Personal Computer
          Programming Encyclopedia"

  
          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)
