Previous chapter · Next chapter ·
Table of Contents
Chapter 9 : SYSTEM MESSAGES
This chapter lists all messages displayed by SNOBOL4.
When SNOBOL4 begins execution, this title is displayed:
Vanilla SNOBOL4 Version 2.14.
(c) Copyright 1984,1988 Catspaw, Inc. All Rights Reserved.
Additional messages which may appear:
Termination messages are normally produced on I/O unit 7, which
defaults to the user's display screen. If the /B option was used in
the invoking command line, they are produced on I/O unit 6,
associated with variable OUTPUT. Dump messages are always produced
to unit 6.
- Cannot open file: name
- The file specified in the command line cannot be opened.
- Command line error:
- A syntactic error was detected in the SNOBOL4 command line. The
command line is displayed on two lines. The line break shows where
the error occurred.
- Errors detected in source program
- There were compilation errors in the source program. Execution
will proceed until a statement with a compilation error is
- Insufficient storage for initialization
- Not enough memory was available to initialize the SNOBOL4
- No errors
- Compilation is complete, and without error. Execution begins
- Normal termination at level LL
- The program transferred to the label END. LL is the current
program-defined function call depth. This message is produced only
if the /S command line option (statistics) was used.
- filename(XXX) : Last statement executed was NNN
- NNN is the statement number of the last statement executed, XXX
is its source line number. It is the statement that transferred to
the END statement. If this was a normal termination, it is only
displayed if the /S option was used.
- filename(XXX) : Warning: Interrupted in statement NNN at
- Execution was interrupted when you pressed the BREAK or
control-C key. The interruption occurred before the specified
statement was executed. LL is the current call depth of
- Incomplete storage regeneration. Terminal dump not
- Stack overflow occurred during storage regeneration, and the
&DUMP keyword was nonzero. Memory is in an indeterminate form,
and a dump listing cannot be produced.
- Dump of variables at termination
- Natural variables Unprotected keywords These headings will
appear if a termination dump was requested by setting the &DUMP
keyword nonzero. Variables are listed only if they contain a
nonnull value. The variable names will be sorted if the &DUMP
keyword is positive; they are unsorted if it is negative.
9.2.1 Job Statistics
End-of-run statistics on program execution are provided if the /S
command line option is used. Compilation and execution times are in
tenths of a second. Times are wall-clock values, and include all
I/O wait time, such as delays for keyboard input:
SNOBOL4 statistics summaryNN
tenths of a second compilation time
NN tenths of a second execution time
NN statements executed, NN failed
NN arithmetic operations performed
NN pattern matches performed
NN regenerations of dynamic storage
NN reads performed
NN writes performed
SNOBOL4 syntax errors are detected during compilation. Statement
compilation ceases at the point where the error was detected. The
error message contains a marker which indicates the valid portion
of the statement accepted by the compiler---the error occurred
after this point. Only the first error in a statement is detected.
The erroneous statement is compiled with an internal error code
which produces an error message if the statement is executed.
Compilation resumes with the next statement. Compilation ceases and
SNOBOL4 terminates if more than 50 errors are found.
When compiling without a list file (/L: command line option),
the compiler will attempt to display the erroneous line on your
screen. If a statement is continued over several lines, only the
line in error is displayed. Several errors cannot be detected until
the absolute end-of-statement is found. This may require reading
the next line, and finding it is NOT a continuation statement. In
this case, the single line displayed will be the NEXT line, with
the error marker in the first character position.
The CODE function may be used to compile SNOBOL4 statements that
have been concatenated into a long string. The CODE function fails
if a syntax error is found, and the keyword &ERRTEXT contains
the error message string for the error encountered.
Most program logic errors can only be detected during program
execution. Some are unconditionally fatal, and cause the SNOBOL4
system to terminate. Others are conditionally fatal---the system
terminates if the value of the keyword &ERRLIMIT is zero. If
&ERRLIMIT is nonzero, the keyword &ERRTYPE is set to the
error message number, &ERRTEXT is set to the message text,
&ERRLIMIT is decremented, and execution continues.
- Binary operators must be surrounded by blanks
- Omitting a blank will often cause this error. An illegal or
undefined binary operator will also produce this error.
- Error in GOTO
- There is a syntactic error in the GOTO field.
- Erroneous END statement
- The END statement contains a syntactic error, or the label
specified in the subject field for initial transfer could not be
- Erroneous integer
- An integer number appears which is too large for the SNOBOL4
system. The allowable range for magnitude values is 0 to
- Erroneous label
- The first character of a statement must be blank, tab,
alphanumeric, * (comment), + or . (continuation), or -
- Erroneous or missing break character
- A character which separates language elements occurs in an
illegal context, or an expression is not balanced with respect to
- Erroneous subject
- A compiler break character appears before the statement subject
field. The break characters are comma, equal sign, right
parenthesis, right square bracket (]), and right angular bracket
- Illegal character in element
- A character was found which was incorrect for the type of
language object being compiled. This often occurs when a blank is
omitted between elements, causing them to run together.
- Improperly terminated statement
- The source statement terminated with an incomplete language
- Limit on compilation errors exceeded
- More than 50 compilation errors were found in the source
- No END statement in source file
- End-of-File was encountered in the source file without an END
- Previously defined label
- A duplicate label appears. The first definition is retained;
subsequent definitions are discarded.
- Unclosed literal
- The closing quotation mark from a literal string is missing.
This error also occurs if the closing quotation mark (single or
double) was different from the opening mark.
The protected keyword &ERRTYPE may be traced, permitting a
program-defined function to gain control when a conditional error
occurs. THe program CODE.SNO provides an example of how to do this.
The initial value of the unprotected keyword &ERRLIMIT is zero,
forcing program termination upon any error.
Errors 1-16 are conditionally fatal. Errors 17-28 are
unconditionally fatal. When execution terminates due to an error,
the following is displayed:
filename(XXX) : Error NN, -- description --
In statement NNN, at level LL
NN is the error number below. NNN is the statement number assigned
in the compiler list file, XXX is the absolute line number in the
source file. LL specifies the current programdefined function call
depth (0 is the normal main-program level).
Tracing is provided for variables, certain keywords, label
transfers, and function calls and returns. A trace message is
output to I/O unit 6 for each trace occurrence. Program execution
time, in tenths of a second, is appended to each message.
- 1. Illegal data type
- The data type of an operand was incorrect for the type of
operation attempted. This occurs most frequently with arithmetic
operations, when one operand is a string which cannot be converted
to a number.
- 2. Error in arithmetic operation
- An arithmetic operation upon integer values produced a result
which was out of range, or was undefined, such as division by
- 3. Erroneous array or table reference
- An array or table reference was made to a variable which did
not contain an array or table pointer.
- 4. Null string in illegal context
- The null string appeared where it is not permitted, such as the
object of an indirect reference.
- 5. Undefined function or operation
- A function was called before it was defined, or an undefined
operator was used.
- 6. Erroneous prototype
- A syntactic error occurred in the prototype string used with
the functions ARRAY, DATA or DEFINE. Note that the blank and tab
characters are not permitted within the prototype string.
- 7. Unknown keyword
- The keyword specified is unknown to the SNOBOL4 system.
- 8. Variable not present where required
- A variable name must be used as the subject of an assignment
statement, or as the argument of the unary cursor, name, or keyword
operator (@, ., &), or the binary pattern match assignment
operators (., $).
- 9. Entry point of function not label
- At the time a program-defined function was first called, its
entry point label did not appear as the label of any SNOBOL4
- 10. Illegal argument to primitive function
- An illegal value was used as an argument to the function ARG,
FIELD, LOCAL, OPSYN, STOPTR, or TRACE, or an illegal value was
specified in the third argument to INPUT or OUTPUT.
- 11. Reading error
- An error condition was returned when reading from a file.
- 12. Illegal I/O unit
- Allowable unit numbers are 1 through 16 (inclusive). (Unit 0 is
allowed in functions INPUT and OUTPUT, and is converted to units 5
and 6 respectively.)
- 13. Limit on defined data types exceeded
- SNOBOL4 allows 899 different program-defined data types.
- 14. Negative number in illegal context
- A negative number was used incorrectly as the argument of the
function LEN, POS, TAB, or RTAB.
- 15. String overflow
- The program attempted to create a string larger than
- 16. Overflow during pattern matching
- The internal SNOBOL4 stack overflowed during pattern matching.
This can happen when a recursive or looping pattern is incorrectly
- 17. Error in SNOBOL4 system
- This message indicates an internal SNOBOL4 system error.
- 18. Return from level zero
- An attempt was made to transfer to the function return label
RETURN, FRETURN, or NRETURN outside of any function call.
- 19. Failure during GOTO evaluation
- The expression used for an indirect transfer within the GOTO
field failed when evaluated.
- 20. Insufficient storage to continue
- All available memory has been used. Vanilla SNOBOL4 is limited
to 30K bytes for program and data. SNOBOL4+, Catspaw's enhanced
version, allocates 300K bytes for program and data.
- 21. Stack overflow
- The SNOBOL4 internal stack has overflowed. This may be caused
by excessive function recursion, or occur during memory garbage
- 22. Limit on statement execution exceeded
- The number of statements executed was greater than the value in
the keyword &STLIMIT. &STLIMIT is initially -1, specifying
- 23. Object exceeds size limit
- The program attempted to create an object larger than the
maximum size allowed.
- 24. Undefined or erroneous GOTO
- A transfer was attempted to an undefined label, or an
expression in a GOTO field evaluated to a string, rather than a
label name---usually the result of omitting the indirect operator
- 25. Incorrect number of arguments
- A primitive function was called with too many arguments.
- 28. Execution of statement with compilation error
- Execution proceeded to a statement that contained a compilation
- Tracing normally occurs only if the keyword &TRACE is
- However, another keyword, &FTRACE, may be set nonzero to
trace all function calls and returns independently of keyword
- STATEMENT NN: <vname> = <value>,TIME =
- Value trace; produced by the function call TRACE('vname',
'VALUE'), where vname is the name of the variable to be
- STATEMENT NN: &<keyname> = <value>,TIME =
- Keyword trace; produced by the function call TRACE('keyname',
'KEYWORD'), where keyname is the upper case keyword name, without
the leading ampersand.
- STATEMENT NN: TRANSFER TO <labname>,TIME = TT
- Label trace; produced by the function call TRACE('labname',
'LABEL'), where labname is the desired label name. Tracing only
occurs on a transfer of control; it does not occur if the labeled
statement is flowed into.
- STATEMENT NN: LEVEL LL CALL OF
<fname>(arg1,...,argn),TIME = TT
- Call trace; produced by the function call TRACE('fname',
'CALL'), where fname is the name of the function to be traced. The
function's arguments at the time of the call are evaluated and
- STATEMENT NN: LEVEL LL RETURN OF <fname> =
<value>,TIME = TT
- STATEMENT NN: LEVEL LL NRETURN OF <fname> =
<value>,TIME = TT STATEMENT NN: LEVEL LL FRETURN OF
<fname>,TIME = TT Return trace; produced by the function call
TRACE('fname', 'RETURN'), where fname is the name of the function
whose return is to be traced. The type of return that occurred is
displayed in the trace message.
- ***Print request too long***
- An internal buffer is used to display trace messages, and
variable values during dumps. If the required display is longer
than 1,800 characters, this error message is produced instead.
Previous chapter · Next chapter ·
Table of Contents