![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-549395233x1.png)
9
These are the error messages you receive when you compile synerr2.p. On line 6, parentheses are used for subscripting (as in FORTRAN), rather than the square brackets that are used in Pascal.
The compiler noted that a was not defined as a procedure (delimited by parentheses in Pascal). Since you cannot assign values to procedure calls, pc diagnosed a malformed statement at the point of assignment.
hostname% pc synerr2.p |
| |||
Mon Feb | 13 11:02:04 1995 synerr2.p: | |||
| 3 | integer a(10) |
| |
e | ||||
E |
| Expected identifier | ||
| 6 |
| read(b); |
|
E |
| Undefined variable | ||
| 7 |
| for c := 1 to 10 do | |
E |
| Undefined variable | ||
| 8 |
| a(c) := b * c | |
E |
| Undefined procedure | ||
E 15010 line 1 - | File output listed in program statement but not | |||
declared |
|
|
|
|
In program synerr2_example: |
| |||
E 18240 | a undefined on line 8 | |||
E 18240 | b undefined on lines 6 8 | |||
E 18240 | c undefined on lines 7 8 | |||
|
|
|
|
|
If pc finds a complete program, but there is more (noncomment) text in the input file, then it indicates that an
If severe errors in the input prohibit further processing, pc may produce a diagnostic message followed by QUIT. Examples include unterminated comments and lines longer than 1,024 characters.
The Pascal program, mism.p | program mismatch_example(output); |
begin writeln('***');
{The next line is the last line in the file. } writeln
Error Diagnostics | 209 |