1: -d command option sets &DUMP to 1 so that a dump
will occur at termination.
2: -v command option causes source listing to be turned on
turns listing on initially (-LIST) and sets &STAT to
one so that execution statistics are given at the end of the run.
3: --work=nnn[b|k|m|g] command option allocates the specified
size of the SNOBOL5 work area. The default is about 30m for
30 megabytes.
4: -ex command option says to execute the program even if there
are syntatic errors in the source code.
5: -s command option sets &STAT to 1 so that a statistics
are shown at termination.
The above options can also be placed on the first line of the source
program if preceded by "-PRM " starting at the beginning of the line.
Where <user-string> is additional information on
the command line you may wish to pass to the
SNOBOL5 program. The colon ":" keeps
SNOBOL5 from looking any further for file
assignments or command options. The program can
look at this information (as well as the file
assignments) using the keyword &PARM which is a
string consisting of everything on the command line invoking
SNOBOL5 (with token separated with zero bytes).
For example the following program residing
in file program.sno:
The SNOBOL5 interpreter is used to run SNOBOL5 programs.
The SNOBOL5 source program must be stored in a file, usually
a file with an extension of ".sno".
An example program resides in the file named english.sno
which has its input data following the "END" statement of the SNOBOL5 program.
So in the simplest case, when you issue the command:
Note that the compilation and execution times are approximate wall clock time (as opposed to
cpu time).
If "IN" is specified for a filename and the modifier is "-std", the
input is from standard input, usually the keyboard.
So you could run a simple one line program by typing:
Sometimes you may wish to stop a running SNOBOL5 program before it
is finished. You can do this by pressing the Ctrl-C key.
The SNOBOL5 program will then terminate and indicate the statement
that it was executing at the time.
This is very useful when you suspect that the program is in an
infinite loop.
You may wish to set the keyword &DUMP = 1 at the beginning of any
program you are debugging so that a dump of all of your SNOBOL5 variables
is printed at the end of the run, even when ended with Ctrl-Break of Ctrl-C.
Sometimes the program may be in some tight state where interrupts are not allowed. To
stop the program even in those cases, press Ctrl-C ten times and this will force termination.
Prior Page, Next Page, First Page of the Oregon SNOBOL5 ReferenceExample SNOBOL5 run
Input from the keyboard
Interrupting your program