Previous Previous chapter · Next Next chapter · Contents Table of Contents

Chapter 5 : KEYWORDS

Keywords allow a program to communicate with SNOBOL4. Their names are set apart from other variables by the unary operator ampersand (&). Protected keywords cannot be changed by a program, while unprotected keywords can.

Several protected keywords can be traced using the TRACE function: &ERRTYPE, &FNCLEVEL, &STCOUNT, and &STFCOUNT. Tracing occurs each time SNOBOL4 alters their value. For example, tracing keyword &STCOUNT produces a trace after every SNOBOL4 statement is executed.

5.1 PROTECTED KEYWORDS

Among these keywords are several which serve as read-only repositories of fundamental system patterns and values, such as &ARB. The nonkeyword form (ARB) may be changed by a program, and later restored to its original value by assigning it the corresponding keyword.

5.2 UNPROTECTED KEYWORDS

These keywords may be set to integer values to modify SNOBOL4's behavior.

5.3 SPECIAL NAMES

The following names have special meaning to SNOBOL4. If casefolding is in effect, they may appear with any combination of upper- and lower-case letters.
Previous Previous chapter · Next Next chapter · Contents Table of Contents