summaryrefslogtreecommitdiff
path: root/test.toc
blob: 2770b9ed0ae2dda91a3562aa5ac58289d4a8aae0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
arr ::= pkg "std/arr";
io ::= pkg "std/io";

putptri ::= fn(x: &int) {
		io.puti(*x);
};

main ::= fn() {
	 io.puts("Hello, world!");
	 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);
};