diff options
Diffstat (limited to 'test.toc')
-rw-r--r-- | test.toc | 34 |
1 files changed, 28 insertions, 6 deletions
@@ -10,13 +10,35 @@ puti @= fn(x: int) { // }; +// Foo @= struct { +// x, y: int; +// z: float; +// }; + + +// bar @= fn() (f: Foo) { +// f.x = 3; +// f.y = 123; +// f.z += 43.2; +// }; + +f @= fn(x @ int) i: int { + i = x; +}; main @= fn() { -f @= fn(x: int, y @ int) int { x + y }; - puti(f(3,5)); - - puti(f(4, 5)); - puti(f(3, 6)); -puti((fn(x: int, y @ int) int { x + y })(1,2)); + puti(f(313)); + puti(f(128)); + puti(f(231)); + puti(f(100+213)); }; +// b := bar(); + +// f @= fn(x: int, y @ int) int { x + y }; +// puti(f(3,5)); + +// puti(f(4, 5)); +// puti(f(3, 6)); +// puti((fn(x: int, y @ int) int { x + y })(1,2)); +// }; |