Project

General

Profile

Download (394 Bytes) Statistics
| Branch: | Tag: | Revision:
1

    
2
type choice = enum { one, two };
3
type entier = int;
4

    
5
const PI = 3;
6

    
7
node toto (x:int) returns (a:int;y:int)
8
var c : choice;b1, b2:entier;
9
let
10
  a = PI fby (a+1);
11
  c = if a=x then one else two ;
12
  b1 = 1 when one(c);
13
  b2 = 2 when two(c);
14
  y = merge c (one -> b1) (two -> b2);
15
tel
16

    
17
node test (x:bool) returns (y:int)
18
var a:int; b:int;
19
let
20
   (a,b) = toto(if x then 0 else 1);
21
   y = a ;
22
tel
23

    
(2-2/3)