Fix - check number of arguments in function calls
[tiger.ml.git] / compiler / testcases / test42.tig
CommitLineData
38ffcb1f
SK
1/* correct declarations */
2let
3
4type arrtype1 = array of int
5type rectype1 = {name:string, address:string, id: int , age: int}
6type arrtype2 = array of rectype1
7type rectype2 = {name : string, dates: arrtype1}
8
9type arrtype3 = array of string
10
11var arr1 := arrtype1 [10] of 0
12var arr2 := arrtype2 [5] of rectype1 {name="aname", address="somewhere", id=0, age=0}
13var arr3:arrtype3 := arrtype3 [100] of ""
14
15var rec1 := rectype1 {name="Kapoios", address="Kapou", id=02432, age=44}
16var rec2 := rectype2 {name="Allos", dates= arrtype1 [3] of 1900}
17
18in
19
20arr1[0] := 1;
21arr1[9] := 3;
22arr2[3].name := "kati";
23arr2[1].age := 23;
24arr3[34] := "sfd";
25
26rec1.name := "sdf";
27rec2.dates[0] := 2323;
28rec2.dates[2] := 2323
29
30end
This page took 0.029954 seconds and 4 git commands to generate.