summaryrefslogtreecommitdiff
path: root/tests/bools.toc
blob: b181972369543c9d16518cd00f612473fbac86a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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() {
	a := foo();
	b ::= foo();
	puti(a);
	puti(b);
}