1: #line 318 "./lpsrc/flx_regress.pak"
2:
3: fun land: 2 * 2 -> 2 = "$1 && $2";
4: type int = "int";
5: fun eq: int * int -> 2 = "$1 == $2";
6:
7: type string = "char*";
8: proc print: string = 'printf("%s",$1);';
9: proc print: int = 'printf("%d",$1);';
10: proc eol: 1 = 'printf("\\n");';
11:
12: val x:int = 1;
13: val y : typeof(x) = 1;
14: val z = 25;
15:
16: print x; eol;
17: print y; eol;
18: print z; eol;
19:
20:
21:
22:
23: typedef tt = int * &tt;
24: var v : tt = (1,&v);
25: var u = (1,&u);
26: val xx = match u with |(?x,_) => x endmatch;
27:
28: print "OK"; eol;
29:
30: fun f(i:int) = { return 1; }
31: fun e(i:int) = { return f 1; }
32:
33: print (e 10); eol;
34:
35: match (1,2) with
36: | (?x,2) => { print x; }
37: | (1,?y) => { print y; }
38: endmatch;
39: eol;
40:
41: print (if 1==1 then "true" else "false" endif); eol;
42: print (if 1==0 then "true" else "false" endif); eol;