diff options
Diffstat (limited to 'test.toc')
-rw-r--r-- | test.toc | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -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(); |