reject programs that import symbols after using them
[voodoo-lang.git] / test / div.voo
blobb6fc734f3e12826e0317fa57e6ae50e529b0b14a
1 #### Test division
3 section data
4 format:
5 string "%d\n\x00"
7 section functions
8 import printf
9 export main
11 main:
12 function argc argv
13     let x 24
14     let y div x 1
15     call printf format y
16     set y div x -1
17     call printf format y
18     set y div x 3
19     call printf format y
20     set y div x -3
21     call printf format y
23     let x -24
24     let y div x 1
25     call printf format y
26     set y div x -1
27     call printf format y
28     set y div x 3
29     call printf format y
30     set y div x -3
31     call printf format y
33     return 0
34 end function