heptagon/test/good/reinit.ept
Cédric Pasteur 04b8853a1d Added a new reinit operator
It has type:
reinit: t at r * t -> t at r

It can be used to put a constant value in a 
location.
2011-10-17 15:28:04 +02:00

9 lines
No EOL
221 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