heptagon/test/good/t13.ept

24 lines
377 B
Text
Raw Permalink Normal View History

2010-06-21 12:11:06 +02:00
node count(c : int; r : bool) returns (res : int)
let
2011-02-14 15:21:57 +01:00
res = c fby (if r then 0 else res + c);
2010-06-21 12:11:06 +02:00
tel
node fourth() returns (res : bool)
var tmp : int;
let
tmp = 0 fby (if res then tmp + 1 else 0);
2010-06-21 12:11:06 +02:00
res = tmp = 0;
tel
node foo() returns (res : int)
let
res = 0 fby (3 + res);
tel
(* Unary operators *)
node main() returns (c : int)
let
c = count(foo(), fourth());
tel