2022-03-17 13:53:42 +08:00
|
|
|
|
1 2 program
|
2022-04-10 20:04:34 +08:00
|
|
|
|
1 23 example
|
|
|
|
|
2 4 type
|
|
|
|
|
2 23 w1
|
|
|
|
|
2 27 =
|
2022-03-17 13:53:42 +08:00
|
|
|
|
2 21 integer
|
|
|
|
|
2 37 ;
|
2022-04-10 20:04:34 +08:00
|
|
|
|
3 23 w2
|
|
|
|
|
3 27 =
|
|
|
|
|
3 19 record
|
|
|
|
|
4 21 integer
|
|
|
|
|
4 23 x
|
|
|
|
|
4 37 ;
|
|
|
|
|
5 22 char
|
|
|
|
|
5 23 y
|
|
|
|
|
5 38 ,
|
|
|
|
|
5 23 z
|
|
|
|
|
5 38 ,
|
|
|
|
|
5 23 m
|
2022-03-23 18:01:59 +08:00
|
|
|
|
5 37 ;
|
2022-04-10 20:04:34 +08:00
|
|
|
|
6 14 end
|
|
|
|
|
6 37 ;
|
|
|
|
|
7 23 w3
|
|
|
|
|
7 27 =
|
|
|
|
|
7 17 array
|
|
|
|
|
7 39 [
|
|
|
|
|
7 24 3
|
|
|
|
|
7 41 ..
|
|
|
|
|
7 24 6
|
|
|
|
|
7 40 ]
|
|
|
|
|
7 18 of
|
2022-04-06 22:54:34 +08:00
|
|
|
|
7 21 integer
|
|
|
|
|
7 37 ;
|
2022-04-10 20:04:34 +08:00
|
|
|
|
9 5 var
|
|
|
|
|
9 21 integer
|
|
|
|
|
9 23 p
|
|
|
|
|
9 37 ;
|
|
|
|
|
10 23 w3
|
|
|
|
|
10 23 c
|
2022-04-03 15:25:23 +08:00
|
|
|
|
10 37 ;
|
2022-04-10 20:04:34 +08:00
|
|
|
|
11 23 w2
|
|
|
|
|
11 23 d
|
|
|
|
|
11 37 ;
|
|
|
|
|
12 21 integer
|
|
|
|
|
12 23 a
|
2022-04-06 22:54:34 +08:00
|
|
|
|
12 37 ;
|
2022-04-10 20:04:34 +08:00
|
|
|
|
14 3 procedure
|
|
|
|
|
14 23 sd
|
|
|
|
|
14 33 (
|
|
|
|
|
14 21 integer
|
|
|
|
|
14 23 s1
|
|
|
|
|
14 37 ;
|
|
|
|
|
14 5 var
|
|
|
|
|
14 21 integer
|
|
|
|
|
14 23 s2
|
|
|
|
|
14 34 )
|
|
|
|
|
14 37 ;
|
|
|
|
|
15 5 var
|
|
|
|
|
15 21 integer
|
|
|
|
|
15 23 x
|
|
|
|
|
15 38 ,
|
|
|
|
|
15 23 y
|
|
|
|
|
15 37 ;
|
|
|
|
|
16 3 procedure
|
|
|
|
|
16 23 sd1
|
|
|
|
|
16 33 (
|
|
|
|
|
16 21 integer
|
|
|
|
|
16 23 y
|
|
|
|
|
16 34 )
|
|
|
|
|
16 37 ;
|
|
|
|
|
17 13 begin
|
|
|
|
|
18 16 write
|
|
|
|
|
18 33 (
|
|
|
|
|
18 23 y
|
|
|
|
|
18 34 )
|
|
|
|
|
19 14 end
|
|
|
|
|
20 13 begin
|
|
|
|
|
21 6 if
|
|
|
|
|
21 23 a
|
|
|
|
|
21 27 =
|
|
|
|
|
21 24 2
|
|
|
|
|
22 7 then
|
|
|
|
|
22 23 x
|
2022-04-06 22:54:34 +08:00
|
|
|
|
22 26 :=
|
2022-04-10 20:04:34 +08:00
|
|
|
|
22 23 s1
|
|
|
|
|
22 31 *
|
|
|
|
|
22 33 (
|
|
|
|
|
22 24 5
|
2022-04-06 22:54:34 +08:00
|
|
|
|
22 29 +
|
2022-04-10 20:04:34 +08:00
|
|
|
|
22 24 7
|
|
|
|
|
22 34 )
|
|
|
|
|
22 29 +
|
|
|
|
|
22 24 10
|
|
|
|
|
23 8 else
|
|
|
|
|
24 23 x
|
2022-04-06 22:54:34 +08:00
|
|
|
|
24 26 :=
|
2022-04-10 20:04:34 +08:00
|
|
|
|
24 23 s1
|
|
|
|
|
24 32 /
|
|
|
|
|
24 24 9
|
|
|
|
|
24 37 ;
|
|
|
|
|
25 23 sd1
|
|
|
|
|
25 33 (
|
|
|
|
|
25 23 x
|
|
|
|
|
25 34 )
|
|
|
|
|
26 9 fi
|
|
|
|
|
26 37 ;
|
|
|
|
|
27 20 return
|
|
|
|
|
28 14 end
|
|
|
|
|
30 13 begin
|
2022-04-06 22:54:34 +08:00
|
|
|
|
31 10 while
|
2022-04-10 20:04:34 +08:00
|
|
|
|
31 23 a
|
2022-04-06 22:54:34 +08:00
|
|
|
|
31 28 <
|
2022-04-10 20:04:34 +08:00
|
|
|
|
31 24 5
|
|
|
|
|
32 11 do
|
|
|
|
|
33 23 sd
|
|
|
|
|
33 33 (
|
|
|
|
|
33 24 2
|
|
|
|
|
33 38 ,
|
2022-04-06 22:54:34 +08:00
|
|
|
|
33 23 a
|
2022-04-10 20:04:34 +08:00
|
|
|
|
33 34 )
|
2022-04-06 22:54:34 +08:00
|
|
|
|
33 37 ;
|
2022-04-10 20:04:34 +08:00
|
|
|
|
34 23 c
|
|
|
|
|
34 39 [
|
|
|
|
|
34 24 3
|
|
|
|
|
34 40 ]
|
2022-04-06 22:54:34 +08:00
|
|
|
|
34 26 :=
|
2022-04-10 20:04:34 +08:00
|
|
|
|
34 23 a
|
|
|
|
|
34 31 *
|
|
|
|
|
34 24 2
|
|
|
|
|
34 37 ;
|
|
|
|
|
35 23 c
|
|
|
|
|
35 39 [
|
|
|
|
|
35 23 a
|
|
|
|
|
35 40 ]
|
|
|
|
|
35 26 :=
|
|
|
|
|
35 23 d
|
|
|
|
|
35 35 .
|
|
|
|
|
35 23 x
|
2022-04-06 22:54:34 +08:00
|
|
|
|
35 37 ;
|
2022-04-10 20:04:34 +08:00
|
|
|
|
36 15 read
|
2022-04-06 22:54:34 +08:00
|
|
|
|
36 33 (
|
2022-04-10 20:04:34 +08:00
|
|
|
|
36 23 p
|
2022-04-06 22:54:34 +08:00
|
|
|
|
36 34 )
|
2022-04-10 20:04:34 +08:00
|
|
|
|
37 12 endwh
|
|
|
|
|
39 14 end
|
|
|
|
|
39 35 .
|
|
|
|
|
39 0 <20>
|