summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc10
1 files changed, 7 insertions, 3 deletions
diff --git a/test.toc b/test.toc
index 82603e0..2bd8e0f 100644
--- a/test.toc
+++ b/test.toc
@@ -45,8 +45,10 @@ putf @= fn(x: float) {
// };
g @= fn() int {
- // foo : [10]int; // = new(int, 10);
- // each _, i := foo {
+ foo : [10]int; // = new(int, 10);
+ total := 0;
+ each foo { total = total + 1; }
+// each _, i := foo {
// foo[i] = i;
// };
// total := 0;
@@ -55,7 +57,6 @@ g @= fn() int {
// }
// total
- total := 0;
each i := 1..10 {
total = total + i;
total
@@ -71,4 +72,7 @@ main @= fn() {
puti(g());
X @= g();
puti(X);
+ each i, j := 1..10 {
+ puti(i + j);
+ }
};