-
Notifications
You must be signed in to change notification settings - Fork 1
/
errKEY.out
76 lines (76 loc) · 2.04 KB
/
errKEY.out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
0 const
1 m = 7, n = 85
1 var
***** ^ semicolon or comma missing
1 i,x,y,z,q,r;
1 procedure multiply;
1 var
2 a,b;
2 begin
3 a := u; b := y; z := 0
***** ^ undeclared identifier
7 while b > 0 do
***** ^ semicolon between statements is missing
12 begin
12 if odd b do z := z+a;
***** ^ then expected
***** ^ incorrect symbol following statement
15 a := 2a; b := b/2;
***** ^ the preceding factor cannot be followed by this symbol
21 end
21 end;
23
23 procedure divide
23 var w;
***** ^ semicolon or comma missing
24 const
***** ^ statement expected
24 two = 2, three := 3;
***** ^ use = instead of :=
24 begin
25 r = x; q := 0; w := y;
***** ^ assignment operator := expected
***** ^ an expression cannot begin with this symbol
31 while w <= r do w := 2*w;
40 while w > y
42 begin q := (2*q; w := w/2);
***** ^ do expected
***** ^ right paranthesis missing
***** ^ the preceding factor cannot be followed by this symbol
52 if w <= r then
55 begin
56 r := r-w
58 q := q+1;
***** ^ the preceding factor cannot be followed by this symbol
62 end
62 end
62 end;
64
64 procedure gcd;
64 var
65 f,g;
65 begin
66 f := x; g := y
69 while f # g do
***** ^ semicolon between statements is missing
74 begin if f<g then g := g-f;
82 if g<f then f := f-g;
90 end;
91 z := f;
93 end;
94
94 begin
95 i:=1;
97 while i#0 do
101 begin
101 x := m; y := n; call multiply;
106 x := 25; y := 3; call divide;
111 x := 84; y := 36; call gcd;
116 call x;
***** ^ call of a constant or a variable is meaningless
116 x := gcd;
***** ^ expression must not contain a procedure identifier
117 i:=i-1;
121 end;
122 end.
18 errors found