snobol4cmd - Man Page

SNOBOL4 interpreter command line syntax

Synopsis

snobol4 [ options ... ] [ file ... ] [ param ... ]

Options

-b

Disable start up banner and termination output (only displayed when no source files are given on the command line).  In earlier releases of CSNOBOL4 -b toggled banner output, and banners were enabled by default.

-d ndesc

Allocate a “dynamic storage” region of ndesc descriptors for program code and data. A suffix of k multiplies the number by 1024, a suffix of m multiplies the number by 1048576.  A larger dynamic region may result in fewer garbage collections (storage regenerations), however large values may cause execution to slow down when large amounts of garbage collect.  Most programs do not need an increased dynamic region to run.  If your program terminates with an “Insufficient storage to continue” message you need to increase the dynamic storage region size.  The -h option displays the default dynamic region size.

-f

Toggle folding of identifiers to upper case (see -CASE and &CASE).

-g

Enable garbage collection tracing (sets &GTRACE to -1).

-h

Give help. Shows usage message, includes default sizes for “dynamic region” and pattern match stack.

-k

Toggle running programs with compilation errors (see -ERROR and -NOERRORS extensions). By default programs with compilation errors will not be run.

-l LISTINGFILE

Enable listing output to the named file. The default listing side is LEFT.

-n

Toggle running programs after compilation (see -EXECUTE and -NOEXECUTE extensions). By default programs are run after compilation.

-p

Toggle SPITBOL extensions (also controlled by -PLUSOPS).

-r

Toggle reading INPUT from command line / source file(s) after the END label.  Otherwise INPUT defaults (back) to standard input after program compilation is complete.

-s

Toggle termination statistics (off by default).

-u param

Specify a parameter string available via HOST(0).

-v

Show version and exit.

-x

Force banner and termination output.

-z

Show directory search path in use (including all -I options on the command line) and exit.

-B

Toggle SNOBOL4B operators (also controlled by -[NO]BLOCKS).

-I directory

Add directory to the directory search path before any other directories (ie; from SNOPATH or default entries). May be used multiple times.

-L file

Preload SNOBOL4 source file. May be used multiple times. Used to preload the sdb(1) source code debugger.

-M

Specifies that all items left on the command line after option processing is complete are to be treated as filenames.  The files are read in turn until an END statement is found (Any remaining data is available via the INPUT variable if the -r option is also given).

-N

Disable standard search path, INCLUDING current working directory. Only directories specified by -I options will be searched. Mnemonic: “no standard include”.

-P ndesc

Allocate ndesc descriptors for the pattern match stack.  A suffix of k multiplies the number by 1024, a suffix of m multiplies the number by 1048576.  The pattern match stack is used to save backtracking and conditional assignment information during pattern matching.  If your program terminates with an “Overflow during pattern matching” message (Error 16) you need to increase the pattern match stack size.  The -h option displays the default pattern match stack size.

-S ndesc

Allocate ndesc descriptors for the interpreter stack.  A suffix of k multiplies the number by 1024, a suffix of m multiplies the number by 1048576.  The interpreter stack is used for saving data, and passing parameters to internal procedures. If your program terminates with an “Stack overflow” message (Error 21) you need to increase the interpreter stack size.  A common reason for needing additional stack space is for tracing deeply nested DATA() structures during garbage collection.  The -h option displays the default interpreter stack size.

-U

Disable stdio buffering. Also set if SNOBOL4UNBUFFERED environment variable is set to a non-null value.  Will increase runtime, but improve behavior when sucking on pipes (use ptys!).

--

Terminates processing items as options. Any remaining strings are treated as files or user parameters (see the HOST() function).

See Also

snobol4(1).

Referenced By

snobol4(1), snobol4blocks(1), snobol4error(1).

March 31, 2022 CSNOBOL4B 2.3.1 CSNOBOL4 Manual