diff options
Diffstat (limited to 'test.toc')
-rw-r--r-- | test.toc | 30 |
1 files changed, 4 insertions, 26 deletions
@@ -1,27 +1,5 @@ -#include "std/io.toc"; +printf ::= #foreign("printf") fn(#C &"const char", #C ..); -g ::= fn(modulator:: int, x :: ..) int { - total := 0; - for e := x { - total += modulator * (e as int); - } - total -}; - -f ::= fn(x :: ..) int { - g(2, x) -}; - -main ::= fn() { - puti(f(5)); - - puti(f(5,6)); - - puti(f(1,2,3)); - - puti(f(1,1,1,1)); - - puti(f()); -}; - -main();
\ No newline at end of file +main::=fn(){ + printf("Hello %d", 5); +};
\ No newline at end of file |