summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc19
1 files changed, 18 insertions, 1 deletions
diff --git a/test.toc b/test.toc
index 97c30b9..b181972 100644
--- a/test.toc
+++ b/test.toc
@@ -1,5 +1,22 @@
#include "std/io.toc";
+foo ::= fn() total := 0{
+ if "foo" || (1/0) {
+ total += 1;
+ }
+ if !"foo" && (1/0) {
+ total += 100;
+ }
+ if "foo" || "bar" && 0 {
+ total += 10;
+ }
+ if !"foo" || !"bar" {
+ total += 1000;
+ }
+}
main ::= fn() {
- puts("hello");
+ a := foo();
+ b ::= foo();
+ puti(a);
+ puti(b);
}