heptagon/test/good/reinit.ept
Gwenal Delaval 87f359a6fd Added main to several tests
Added main to tests
Added dependency statics -> statics2 in scripts
2012-07-17 17:57:04 +02:00

17 lines
349 B
Text

const n:int = 100
const t_0:int^n = 1^n
node f(a:int^n at r; c:bool) returns (o:int^n at r)
var a1, a2:int^n at r;
let
(a1, a2) = split c (a);
o = merge c (true -> reinit (a1, t_0)) (false -> [ a2 with [0] = 0 ])
tel
node main() returns (o:int^n)
var c:bool;a:int^n at r;
let
init<<r>> a = 1^n;
c = true fby false fby c;
o = f(a, c)
tel