1SNOBOL4KEY(1) CSNOBOL4 Manual SNOBOL4KEY(1)
2
3
4
6 snobol4key - SNOBOL4 keywords
7
9 &ABEND
10 Unprotected, INTEGER: Setting to a non-zero value causes a call to
11 abort(3) (causes a core dump) instead of “exit” when snobol4(1)
12 finishes program execution. A relic of when “ABEND” meant program
13 memory would be dumped on the line printer on “abnormal ending” of
14 a batch job! Standard.
15
16 &ABORT
17 Protected, PATTERN: Initial value of ABORT variable. Standard.
18
19 &ALPHABET
20 Protected, STRING: Native character set (always 255 characters
21 long). Standard.
22
23 &ANCHOR
24 Unprotected, INTEGER: When set to a non-zero value, pattern
25 matching is done in “anchored mode” (pattern matches will not be
26 retried skipping successive numbers of leading subject characters),
27 and patterns must match the initial part of the subject. NOTE!
28 Anchored matching is faster, but portable code should not depend on
29 (or modify) the value of &ANCHOR!! Individual patterns can be
30 anchored using POS(0), and use of BREAKX() avoids repeated match
31 failures that occur in non-anchored scanning. Standard.
32
33 &ARB
34 Protected, PATTERN: Initial value of ARB variable. Standard.
35
36 &BAL
37 Protected, PATTERN: Initial value of BAL pattern variable.
38 Standard.
39
40 &CASE
41 Unprotected, INTEGER: Zero disables case folding in a running
42 program, non-zero value reenables. See snobol4(1) and -CASE in
43 snobol4ctrl(1). Extension from SPITBOL, added in CSNOBOL4 version
44 0.91
45
46 &CODE
47 Unprotected, INTEGER: Controls the status code when snobol4(1)
48 exits - defaults to zero. Standard.
49
50 &COMPNO
51 Protected, INTEGER: Number of compiled statements. Extension from
52 SNOBOL4B, SITBOL, added in CSNOBOL4 version 2.0
53
54 &DIGITS
55 Protected, STRING: Digits “0123456789”. Extension from Icon!,
56 added in CSNOBOL4 version 1.5
57
58 &DUMP
59 Unprotected, INTEGER: If non-zero dump variables (to stderr) on
60 termination. Standard.
61
62 &ERRLIMIT
63 Unprotected, INTEGER: Positive number of (otherwise fatal) errors
64 to allow/trap, decremented on each error. Standard.
65
66 &ERRTEXT
67 Protected, STRING: Contains description of last error after a
68 statement with an error has been handled due to a non-zero value in
69 &ERRLIMIT, see snobol4error(1). SPITBOL Extension, added in
70 CSNOBOL4 0.98.2.
71
72 &ERRTYPE
73 Protected, INTEGER: Contains last error code after a statement with
74 an error has been handled due to a non-zero value in &ERRLIMIT, see
75 snobol4error(1). Standard, Traceable.
76
77 &FAIL
78 Protected: Initial value of FAIL pattern variable. Standard.
79
80 &FATAL
81 Protected, INTEGER: Set to one when an otherwise fatal error has
82 been trapped via SETEXIT (because FATALLIMIT was positive). Fatal
83 errors cannot be resumed via CONTINUE or SCONTINUE. CSNOBOL4
84 Extension, added in version 2.2.
85
86 &FATALLIMIT
87 Unprotected, INTEGER: Positive number of (otherwise fatal in
88 standard SNOBOL4) errors to trap via SETEXIT; decremented on each
89 error. CSNOBOL4 Extension, added in version 2.2.
90
91 &FENCE
92 Protected, PATTERN: Initial value of FENCE pattern variable.
93 Standard.
94
95 &FILE
96 Protected, STRING: Name of source file. Extension from SPITBOL?,
97 added in CSNOBOL4 version 0.98.2.
98
99 &FILL
100 Unprotected, STRING: Extension from BLOCKS, added in CSNOBOL4
101 version 2.0.
102
103 &FNCLEVEL
104 Protected, INTEGER: Depth of function call stack. Standard,
105 Traceable.
106
107 &FTRACE
108 Unprotected, INTEGER: Non-zero to enable function call tracing.
109 Decremented after each trace event. Standard.
110
111 &FULLSCAN
112 Unprotected, INTEGER: Non-zero to enable “fullscan” heuristic.
113 Standard.
114
115 &GCTIME
116 Protected, REAL: Milliseconds of execution time spent in the
117 garbage collector. CSNOBOL4 Extension, added in version 1.5.
118
119 >RACE
120 Unprotected, INTEGER: If set to a non-zero value, each time a
121 garbage collection is run, a trace message is output indicating the
122 source file and line number of the current statement, how long the
123 GC took, and how many units of storage are now free. If positive,
124 the value of >RACE will be decremented after it is tested.
125 CSNOBOL4 Extension, added in version 1.1.
126
127 &INPUT
128 Unprotected, INTEGER: If zero, disables checking for input
129 associations for variables. Standard.
130
131 &LASTFILE
132 Protected, STRING: Source file name for last statement executed;
133 useful in TRACE() and SETEXIT() handlers. Extension from SPITBOL,
134 added in CSNOBOL4 version 0.98.2.
135
136 &LASTLINE
137 Protected, INTEGER: Source file line number for last statement
138 executed; useful in TRACE() and SETEXIT() handlers. Extension from
139 SPITBOL, added in CSNOBOL4 version 0.98.2.
140
141 &LASTNO
142 Protected, INTEGER: Statement number for last statement executed;
143 useful in TRACE() and SETEXIT() handlers. Standard.
144
145 &LCASE
146 Protected, STRING: Lower case (english) letters, in alphabetical
147 order. Extension from SPITBOL, added in CSNOBOL4 version 0.91
148
149 &LINE
150 Protected, INTEGER: Extension from SPITBOL, added in CSNOBOL4
151 version 0.98.2.
152
153 &MAXINT
154 Protected, INTEGER: The largest positive integer value that can be
155 represented by the INTEGER data type. CSNOBOL4 Extension added in
156 version 1.5.
157
158 &MAXLNGTH
159 Unprotected, INTEGER: Standard (unlimited since CSNOBOL4 version
160 0.99.44).
161
162 &OUTPUT
163 Unprotected: If zero, disables checking for output associations for
164 variables. Standard.
165
166 &PARM
167 Protected, STRING: The entire command line. Use of the SPITBOL
168 compatible HOST() function is preferable, as it makes it possible
169 to tell if a positional parameter containing spaces was passed in
170 using shell quote characters. SNOBOL4+ Extension, added in
171 CSNOBOL4 version 0.98.3.
172
173 &PI Protected, REAL: The transcendental number π. CSNOBOL4 Extension,
174 added in version 1.5.
175
176 &REM
177 Protected, PATTERN: Initial value of REM variable. Standard.
178
179 &RTNTYPE
180 Protected, STRING: One of RETURN, FRETURN, NRETURN. Standard.
181
182 &STCOUNT
183 Protected, INTEGER: Count of the number of statements executed
184 (extension: not incremented when &STLIMIT is less than zero).
185 Standard, Traceable.
186
187 &STEXEC
188 Protected, INTEGER: Count of the number of statements executed
189 (regardless of the value of &STLIMIT). CSNOBOL4 Extension, added
190 in version 1.5.
191
192 &STFCOUNT
193 Protected, INTEGER: Count of the number of statements executed that
194 failed. Standard, Traceable.
195
196 &STLIMIT
197 Unprotected: Number of (remaining) statements to be executed.
198 CSNOBOL4 implements the XXX extension that values less than zero
199 remove the statement limit. When less than zero, &STCOUNT is not
200 incremented. Standard, Defaults to -1 since CSNOBOL4 version 0.98.
201
202 &STNO
203 Protected, INTEGER: Current statement number. Standard.
204
205 &SUCCEED
206 Protected, PATTERN: Initial value of SUCCEED variable. Standard.
207
208 &TRACE
209 Unprotected, INTEGER: Positive values enable TRACE functionality
210 (other than FUNCTION trace). Decremented after each TRACE event.
211 Standard.
212
213 &TRIM
214 Unprotected, INTEGER: If non-zero, trailing spaces are removed from
215 input from files. A relic of fixed record length (eg; card reader)
216 input. Standard, disabled by default since CSNOBOL4 version 0.91.
217
218 &UCASE
219 Protected, STRING: Upper case (english) letters, in alphabetical
220 order. Extension from SPITBOL, added in CSNOBOL4 version 0.91.
221
223 Need to research origins SPITBOL extensions.
224
225 Note which keywords can be traced (and whether this is an extension).
226
228 snobol4(1), snobol4ctrl(1), snobol4ext(1).
229
230
231
232CSNOBOL4B 2.3.1 March 31, 2022 SNOBOL4KEY(1)