repo.or.cz
/
voodoo-lang.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Updated Makefiles to fit new directory structure.
[voodoo-lang.git]
/
test
/
plusminus.voo
blob
3f5af5e9d5089d9dbc96d78b880f3121c24cef45
1
#### Test addition and subtraction
2
3
section data
4
format:
5
string "%d\n\x00"
6
7
section code
8
import printf
9
export main
10
11
main:
12
function argc argv
13
let x 0
14
let y add x 1
15
call printf format y
16
set x add y -1
17
call printf format x
18
set x add x y
19
call printf format x
20
set x sub x x
21
call printf format x
22
23
set x sub x 5
24
call printf format x
25
set y add y x
26
call printf format y
27
set y sub y x
28
call printf format y
29
set x sub x -6
30
call printf format x
31
32
return 0
33
end function