Error Diagnostics
217
9
If you declare a label but never use it, Pascal gives you a warning. This is true
even for a label declared in global scope.
Compiler Panics, I/O Errors
One class of error that rarely occurs, but which causes termination of all
processing when it does, is a panic.
A panic indicates a compiler-detected internal inconsistency. A typical panic
message follows:
pc0 internal error line=110 yyline=109
If you receive such a message, compilation is terminated. Save a copy of your
program, then contact Sun Customer Support. If you were making changes to
an existing program when the problem occurred, you may be able to work
around the problem by determining which change caused the internal error
and making a different change or error correction to your program.
The only other error that aborts compilation when no source errors are
detected is running out of memory. Most tables in Pascal, with the exception
of the parse stack, are dynamically allocated, and can grow to take up a good
deal of process space. In general, you can get around this problem with large
programs by using the separate compilation facility. See Chapter 5, “Separate
Compilation,” for details.
If you receive an
out of space
message during translation of a large
procedure or function, or one containing a large number of string constants,
either break the procedure or function into smaller pieces or increase the
maximum data segment size using the
limit
command of
csh
(1).
Runtime Errors
When Pascal detects an error in a program during runtime, it prints an error
message and aborts the program, producing a core image.
Following is a list of runtime errors that Pascal generates:
<
filename
> : Attempt to read from a file open for writing
<
filename
> : Attempt to write to a file open for reading
Summary of Contents for SunSoft Pascal 4.0
Page 14: ...xiv Pascal 4 0 User s Guide ...
Page 16: ...xvi Pascal 4 0 User s Guide ...
Page 30: ...6 Pascal 4 0 User s Guide 1 ...
Page 160: ...136 Pascal 4 0 User s Guide 6 ...
Page 268: ...244 Pascal 4 0 User s Guide 11 ...
Page 320: ...296 Pascal 4 0 User s Guide B ...
Page 331: ...Index 307 ...
Page 333: ......