24 lines
392 B
Text
24 lines
392 B
Text
node count(c : int; r : bool) returns (res : int)
|
|
let
|
|
(* res = c fby (if r then 0 else res + c);*)
|
|
res = 0;
|
|
tel
|
|
|
|
node fourth() returns (res : bool)
|
|
var tmp : int;
|
|
let
|
|
tmp = 0 fby (if res then 0 else tmp + 1);
|
|
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
|
|
|