Error Diagnostics
215
9
To make the assignment statement work, you must declare a type and use it to
declare the variables, as follows:
Alternatively, you could use the declaration:
The assignment statement then works.
Unreachable Statements
Pascal flags unreachable statements. Such statements usually correspond to
errors in the program logic, as shown in the following example:
type
r = record
a: integer;
b: char;
end;
var
x: r;
y: r;
x, y : record
a: integer;
b: char;
end;
The Pascal program,
unreached.p
program unreached_example(output);
label
1;
begin
goto 1;
writeln('Unreachable.');
1:
writeln('Reached this.');
end. { unreached_example }
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......