Updated Makefiles to fit new directory structure.
[voodoo-lang.git] / test / plusminus.voo
blob3f5af5e9d5089d9dbc96d78b880f3121c24cef45
1 #### Test addition and subtraction
3 section data
4 format:
5 string "%d\n\x00"
7 section code
8 import printf
9 export main
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
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