summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc13
1 files changed, 9 insertions, 4 deletions
diff --git a/test.toc b/test.toc
index 6c9ff18..5c5b9fc 100644
--- a/test.toc
+++ b/test.toc
@@ -1,9 +1,14 @@
#C("#include <stdio.h>\n");
-foo @= fn() [3]int {
- x : [3]int;
+foo @= fn() [3][3]int {
+ x : [3][3]int;
x
};
main @= fn() {
- x := foo();
- #C("printf(\"Foo: %ld\\n\", (long)x)");
+ x : [3][3]int = foo();
+ #C("
+for (int i = 0; i < 3; i++)
+ for (int j = 0; j < 3; j++)
+ printf(\"%ld\", x[i][j]);
+puts(\"\");
+ ");
};