diff options
Diffstat (limited to 'tests/misc.toc')
-rw-r--r-- | tests/misc.toc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/misc.toc b/tests/misc.toc index 04932e8..a6a7da5 100644 --- a/tests/misc.toc +++ b/tests/misc.toc @@ -1,17 +1,6 @@ #include "std/io.toc", io; main ::= fn() { - x ::= 3; - #if x > 2 { - io.puts("Hello!"); - } else { - foo("yes"); - } - - io.puti(arr_sum(mk_arr(5,89,22))); - io.puti(arr_sum(mk_arr(1,2,3))); - io.puti(arr_sum(mk_arr(z=0, 0, 0))); - arr_sum ::= fn(n::=, t::=, a:[n]t) t { total := 0 as t; for x := a { @@ -25,6 +14,17 @@ main ::= fn() { a[1] = y; a[2] = z; }; + x ::= 3; + #if x > 2 { + io.puts("Hello!"); + } else { + foo("yes"); + } + + io.puti(arr_sum(mk_arr(5,89,22))); + io.puti(arr_sum(mk_arr(1,2,3))); + io.puti(arr_sum(mk_arr(z=0, 0, 0))); + s ::= struct { |