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

Error Diagnostics

217