summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc22
1 files changed, 19 insertions, 3 deletions
diff --git a/test.toc b/test.toc
index 3346b9e..8b5c7fc 100644
--- a/test.toc
+++ b/test.toc
@@ -1,11 +1,27 @@
// #C("#include <stdio.h>
// #define kasfdhkjasdfhjk ");
-puti @= fn(x: int) {
+// puti @= fn(x: int) {
// #C("printf(\"%ld\\n\", (long)x)");
+// };
+
+foo @= fn() int {
+ // X := new([100]int);
+ i := 0;
+ while i < 100 {
+ // (*X)[i] = i;
+ i = i + 1;
+ }
+ i
+ // total := 0;
+ // i = 0;
+ // while i < 100 {
+ // total = total + (*X)[i];
+ // i = i + 1;
+ // }
+ // total
};
main @= fn() {
- Ar := new([5]int);
- A:=new(int, 100);
+ Ar : [foo()]int;
};