summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc19
1 files changed, 8 insertions, 11 deletions
diff --git a/test.toc b/test.toc
index 33ccd3f..3f059a4 100644
--- a/test.toc
+++ b/test.toc
@@ -1,15 +1,12 @@
-#include "std/io.toc";
+#include "std/io.toc", io;
main ::= fn() {
- foo : [5][]char;
- for x := &foo {
- *x = "hello";
- }
- for x := foo {
- puts(x);
- }
- for c := "foobar" {
- puti(c as int);
+ s ::= struct {
+ foo, e: int;
+ bar ::= 3;
+ baz: float;
}
+
+ p: s;
+ io.puti(p["bar"]);
}
-main();