Error Diagnostics

9

 

 

 

 

 

 

 

 

 

This chapter discusses the errors you may come across while writing software programs with Pascal. It contains the following sections:

Compiler Syntax Errors

page 205

 

 

Compiler Semantic Errors

page 210

 

 

Compiler Panics, I/O Errors

page 217

 

 

Runtime Errors

page 217

 

 

Note – Appendix B, “Error Messages,” lists in numerical order all the error messages generated by Pascal.

Compiler Syntax Errors

Here are some common syntax errors in Pascal programs and the ways that the compiler handles them.

Illegal Characters

Characters such as @ are not part of Pascal. If they are found in the source program and are not part of a string constant, a character constant, or a comment, they are considered to be illegal characters. This error can happen if you leave off a closing string quotation mark (').

205