heptagon/test/good/autohiera2.ept
Leonard Gerard 1d390848fe real good switch fix.
The order switch then reset was wrong, since some reset reset slower inner blocks and equations, to have reset correct after switch it would have been necessary to sample the reset condition correctly (use r when c) using the level_ck... anyway the order seems now irrelevant considering code size.
2011-05-10 20:28:39 +02:00

24 lines
414 B
Text

node count() returns (o : int)
let
o = 0 fby (o + 1);
tel
node main(x : bool) returns (c : bool)
let
automaton
state One
do
automaton
state A
do c = x;
until count() = 2 then B
state B
do c = not(x);
until true then A
end
until true then Two
state Two
do c = x;
until true then One
end
tel