summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc30
1 files changed, 4 insertions, 26 deletions
diff --git a/test.toc b/test.toc
index 3bebaf7..f3da2c1 100644
--- a/test.toc
+++ b/test.toc
@@ -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