summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc20
1 files changed, 12 insertions, 8 deletions
diff --git a/test.toc b/test.toc
index 115f97b..a89c6fb 100644
--- a/test.toc
+++ b/test.toc
@@ -1,13 +1,17 @@
-#C("#include <stdio.h>\n");
-
-print_int @= fn(y: int) {
- #C("printf(\"%ld\\n\", (long)x);\n");
+N @= 3;
+foo_func @= fn(x: int) [N][N]int {
+ foo : [3]int;
+ foo[0] = x*1;
+ foo[1] = x*2;
+ foo[2] = x*3;
+ asdf : [3][3]int;
+ asdf[0] = foo;
+ asdf[1] = foo;
+ asdf[2] = foo;
+ asdf
};
-
-times2 @= fn(x: int) int { x + x };
-
main @= fn() {
- print_int(times2(5));
+ asdf : [3][3]int = foo_func(5);
foo := fn (x, y, z,w : f32, A:f64) {};
foo(3,4,5,3,5);
};