summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc22
1 files changed, 18 insertions, 4 deletions
diff --git a/test.toc b/test.toc
index eea04f7..71545c6 100644
--- a/test.toc
+++ b/test.toc
@@ -1,9 +1,16 @@
puti @= fn(x: int) {
- #C("printf(\"%ld\\n\", (long)x)");
+ #C("printf(\"%ld\\n\", (long)x);
+");
+};
+
+putch @= fn(x: char) {
+ #C("printf(\"%c\\n\", x);
+");
};
putf @= fn(x: float) {
- #C("printf(\"%f\\n\", (double)x)");
+ #C("printf(\"%f\\n\", (double)x);
+");
};
foo @= fn() int {
@@ -22,5 +29,12 @@ main @= fn() {
puti(N);
x : [foo()]int;
puti(foo());
-
-};
+ teststr := "Hello!";
+ i := 0;
+ while i < 5 {
+ putch(teststr[i]);
+ i = i + 1;
+ }
+ y:int=5+#C("(1<<3)");
+ puti(y);
+};