Research V3 development
[unix-history] / man / man1 / sno.1
.pa 1
.he 'SNO (I)'2/9/73'SNO (I)'
.ti 0
NAME sno -- SNOBOL interpreter
.sp
.ti 0
SYNOPSIS sno\b\b\b___ [ file ]
.sp
.ti 0
DESCRIPTION sno\b\b\b___
is a SNOBOL III (with slight differences)
compiler and interpreter.
sno\b\b\b___ obtains input from the
concatenation of file\b\b\b\b____ and the standard input.
All input through a statement
containing the label 'end' is
considered program and is compiled.
The rest is available to 'syspit'.
The following is a list of differences
between sno\b\b\b___ and SNOBOL III:
.in +3
There are no unanchored searches.
To get the same effect:
.ti +3
a ** b unanchored search for b
.ti +3
a *x* b = x c unanchored assignment
No back referencing
.ti +3
x = "abc"
.ti +3
a *x* x unanchored search for "abc"
Different function declaration.
The function declaration is
done at compile time by the use of the label 'define'.
Thus there is no ability to define functions at run time
and the use of the name 'define' is preempted.
There is also no provision for 'automatic' variables
other than the parameters.
.ti +3
define f()
.ti +3
or
.ti +3
define f(a,b,c)
All labels except 'define' (even 'end')
must have a non-empty statement.
If 'start' is a label in the program,
program execution will start there.
If not, execution begins with the first
executable statement.
('define' is not an executable statement)
There are no builtin functions
Variable length patterns
at the end of a pattern match are not treated
specially.
They still match the shortest rather than
longest text.
Parentheses for arithmetic are not needed.
Normal (eg FORTRAN) precedence applies.
Because of this, the arithmetic
operators '/' and '*'
must be set off by space.
The right side of assignments
must be non-empty.
Either ' or " may be used for literal quotes.
The pseudo-variable 'sysppt' is not available.
.in -3
.sp
.ti 0
FILES --
.sp
.ti 0
SEE ALSO SNOBOL III manual.
(JACM\b\b\b\b____; Vol. 11 No. 1; Jan 1964; pp 21)
.sp
.ti 0
DIAGNOSTICS As appropriate
.sp
.ti 0
BUGS Runtime
diagnostics give the
last program line number
rather than the executing statement line number.