repo.or.cz
/
toypasc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Iniciado trabalho com llvm_codegen_visitor.
[toypasc.git]
/
pascal
/
sample2.pas
blob
b05c3a9810a945b73e0358a72bee1a3a787e8562
1
program
sample2
;
2
3
var
b
:
boolean
;
4
var
c
:
char
;
5
var
i
,
j
:
Integer
;
6
7
Procedure
myproc
();
8
var
mp
:
boolean
;
9
Begin
10
b
:=
false
;
11
mp
:=
not
b
;
12
{
13
printint(i);
14
printchar(c);
15
}
16
printbool
(
mp
);
17
println
()
18
End
;
19
20
function
myfunc
(
a
:
integer
,
b
:
integer
) :
integer
;
21
var
mf1
,
mf2
:
boolean
;
22
var
mf3
:
boolean
;
23
Begin
24
mf1
:=
true
;
25
myfunc
:=
a
+
b
26
End
;
27
28
Begin
29
c
:=
'z'
;
30
i
:=
13
;
31
j
:=
0
;
32
b
:=
not
false
or
(
13
<>
j
);
33
34
{
35
while j <= 10 do
36
begin
37
printint(i);
38
printchar(c);
39
printbool(b);
40
println()
41
end;
42
43
if b then
44
printchar('v')
45
else
46
printchar('f');
47
48
for i := 2 * 3 to 10 + 1 do
49
printint(i);
50
}
51
52
myproc
();
53
j
:=
myfunc
(
false
,
i
);
54
printint
(
j
);
55
56
i
:=
70
+
80
*
5
+
3
;
57
i
:=
1
*
2
+
3
*
4
58
End
.