Error Diagnostics
213
9
This program generates the following error messages:
program expr_example(output);
var
a: set of char;
b: Boolean;
c: (red, green, blue);
p: ^ integer;
A: alfa;
B: packed array [1..5] of char;
begin
b := true;
c := red;
new(p);
a := [];
A := 'Hello, yellow';
b := a and b;
a := a * 3;
if input < 2 then writeln('boo');
if p <= 2 then writeln('sure nuff');
if A = B then writeln('same');
if c = true then writeln('hue''s and color''s')
end. { expr_example }
hostname% pc expr.p
Mon Feb 13 13:36:51 1995 expr.p:
E 13050 line 16 - Constant string too long
E 20070 line 17 - Left operand of and must be Boolean, not set
E 25550 line 18 - expression has invalid type
E 20030 line 18 - Cannot mix sets with integers and reals as operands of *
E 20240 line 19 - files may not participate in comparisons
E 20230 line 20 - pointers and integers cannot be compared - operator was <=
E 20220 line 21 - Strings not same length in = comparison
E 20230 line 22 - scalars and Booleans cannot be compared - operator was =
Содержание 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: ......