1SNOBOL4EXT(1)                   CSNOBOL4 Manual                  SNOBOL4EXT(1)
2
3
4

NAME

6       snobol4ext - CSNOBOL4 extensions
7

DESCRIPTION

9       This page describes extensions to the Bell Telephone Laboratories
10       portable implementation of SNOBOL4 in snobol4(1).
11
12       ARRAY/TABLE access
13           Multiple ARRAY and/or TABLE index operations may appear in a row,
14           without having to resort to use of the ELEMENT function, so long as
15           no intervening spaces (or line continuations) appear.
16
17       Case folding
18           By default the compiler folds identifiers and directives to upper
19           case, so programs can be entered in either case: see snobol4(1),
20           -CASE in snobol4ctrl(1), &CASE in snobol4key(1).
21
22       Control lines
23           The following additional “control lines” are implemented: -CASE,
24           -COPY, -BLOCKS/-NOBLOCKS, -ERROR/-NOERRORS, -EXECUTE/-NOEXECUTE,
25           -HIDE, -INCLUDE, -LINE: See snobol4ctrl(1).
26
27       Functions
28           The following additional functions are implemented: ATAN(),
29           BREAKX(), CHAR(), CHOP() COS(), DATE(), DELETE(), EXP(), FILE(),
30           FILE_ABSPATH(), FILE_ISDIR() FREEZE(), FUNCTION(), HOST(),
31           IO_FINDUNIT() LABEL(), LEQ(), LGE(), LLE(), LLT(), LN(), LNE(),
32           LOG(), LPAD(), ORD(), RENAME(), REVERSE(), RPAD(), RSORT(), SET()
33           SETEXIT(), SIN(), SORT(), SQRT(), SSET(), SUBSTR(), TAN(), THAW(),
34           VDIFFER(): see snobol4func(1).
35
36       Keywords
37           The following additional keywords are implemented: &CASE, &DIGITS,
38           &ERRTEXT &FATAL, &FATALLIMIT, &FILE, &GCTIME, &GTRACE &LASTFILE,
39           &LASTLINE, &LCASE, &LINE, &MAXINT, &PARM, &PI, &STEXEC, &UCASE: see
40           snobol4key(1).
41
42       REAL numbers in INTEGER contexts
43           REAL numbers (or strings convertible to REAL) are accepted in all
44           contexts which previously required an INTEGER (or string
45           convertible to INTEGER).  Contexts include TABLE(), ITEM(), array
46           indices, INPUT(), OUTPUT(), SET(), keyword values, CHAR(), RPAD(),
47           LPAD(), FIELD(), COLLECT(), DUMP(), DUPL(), OPSYN(), SUBSTR() added
48           in CSNOBOL4 0.99.44.
49
50       Scientific notation
51           REAL number syntax has been expanded to allow exponents of the
52           form: ANY('Ee') ('+' | '-' | ”) SPAN('0123456789') -- added in
53           CSNOBOL4 0.98.
54
55           Exponential format reals need not contain a decimal point
56            added in CSNOBOL4 0.99.44.
57
58
59       SPITBOL extensions
60           For compatibility with SNOBOL4+, certain SPITBOL extensions can be
61           enabled and disabled using the -PLUSOPS directive.  -PLUSOPS 0 or
62           -PLUSOPS disables SPITBOL operators, while -PLUSOPS n where n is a
63           non-zero integer enables them.  SPITBOL extensions are enabled by
64           default.  Extensions controlled by PLUSOPS are as follows:
65
66           The SPITBOL scan (?) and assignment (=) operators have been added.
67           A pattern match can appear within an expression, and returns the
68           matched string as its value.  Similarly assignment can appear in an
69           expression, and returns the assigned value. An assignment after a
70           scan (ie; STRING ? PATTERN = VALUE) performs a scan and replace.
71           Assignment is right associative, and has the lowest precedence,
72           while scan is left associative and has a precedence just higher
73           than assignment.
74
75           The SPITBOL selection/alternative construction can be used in any
76           expression.  It consists of a comma separated list of expressions
77           inside parentheses.  The expressions are evaluated until one
78           succeeds, and its value is returned.  Abuse of this construction
79           may result in incomprehensible code.
80
81           The type NUMERIC with CONVERT() and the removal of leading spaces
82           from strings converted to numbers (implicitly or explicitly) are
83           also legal when SPITBOL extensions are enabled.
84
85       TERMINAL I/O variable
86           The variable TERMINAL is associated with the standard error file
87           descriptor for both input and output (replaces PUNCH variable).
88
89       TRACE() function type argument
90           The second argument of the TRACE() function can be abbreviated to a
91           single letter: C (CALL), F (FUNCTION), K (KEYWORD), L (LABEL), R
92           (RETURN), or V (VALUE) as in Macro SPITBOL.
93
94       Keyword trace
95           TRACE() works on &STFCOUNT keyword added in CSNOBOL4 0.99.44.
96
97       Value TRACE() on pattern match assignments
98           variable changes by . and $ operators are visible via value trace.
99

BUGS

101       Add CSNOBOL4 version where each extension added?
102
103       Group the keywords, control lines, functions, operators together?
104

SEE ALSO

106       snobol4(1).  snobol4ctrl(1), snobol4func(1), snobol4key(1).
107
108
109
110CSNOBOL4B 2.3.1                 March 31, 2022                   SNOBOL4EXT(1)
Impressum