summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc10
1 files changed, 9 insertions, 1 deletions
diff --git a/test.toc b/test.toc
index d522bad..759f19b 100644
--- a/test.toc
+++ b/test.toc
@@ -9,8 +9,16 @@ putf ::= fn(x: float) {
arr ::= pkg "a";
-
+putptri ::= fn(x: &int) {
+ puti(*x);
+};
main ::= fn() {
x : arr.Arr(int);
+ arr.arr_add(&x, 10);
+ arr.arr_add(&x, 20);
+ arr.arr_add(&x, 80);
+ arr.arr_add(&x, 5430);
+ arr.arr_add(&x, -6546);
+ arr.arr_foreach(x, putptri);
}; \ No newline at end of file