= "What is your name?" Username = INPUT OUTPUT = "Thank you, " Username END To choose between three possible outputs... OUTPUT = "What is your name?" Username = INPUT Username "J" :S(LOVE) Username "K" :S(HATE) MEH OUTPUT = "Hi, " Username :(END) LOVE OUTPUT = "How nice to meet you, " Username :(END) HATE OUTPUT = "Oh. It's you, " Username END To continue requesting input until no more is forthcoming... OUTPUT = "This program will ask you for personal names" OUTPUT = "until you press return without giving it one" NameCount = 0 :(GETINPUT) AGAIN NameCount = NameCount + 1 OUTPUT = "Name " NameCount ": " PersonalName GETINPUT OUTPUT = "Please give me name " NameCount + 1 PersonalName = INPUT PersonalName LEN(1) :S(AGAIN) OUTPUT = "Finished. " NameCount " names requested." END Implementations The classic implementation was on the PDP-10; it has been used to study compilers, formal grammars, and artificial intelligence, especially machine translation and machine comprehension of natural languages. The original implementation was on an IBM 7090 at Bell Labs, Holmdel, N.J. SNOBOL4 was specifically designed for portability; the first implementation was started on an IBM 7094 in 1966 but completed on an IBM 360 in 1967. It was rapidly ported to many other platforms. It is normally implemented as an interpreter because of the difficulty in implementing some of its very high-level features, but there is a compiler, the SPITBOL compiler, which provides nearly all the facilities that the interpreter provides. The classic implementation on the PDP-10 was quite slow, and in 1972 James Gimpel of Bell Labs, Holmdel, N.J. designed a native implementation of SNOBOL4 for the PDP-10 that he named SITBOL. He used the design as the basis of a graduate class in string processing that he taught that year at Stevens Institute of Technology (which is why it was named SITBOL). Students were given sections to implement (in PDP-10 assembler) and the entire semester was focused on implementing SITBOL. It was over 80% complete by the end of the semester and was subsequently completed by Professor Gimpel and several students over the summer. SITBOL was a full-featured, high-performance SNOBOL4 interpreter. The Gnat Ada Compiler comes with a package (GNAT.Spitbol) that implements all of the Spitbol string manipulation semantics. This can be called from within an Ada program. The file editor for the Michigan Terminal System (MTS) provided pattern matching based