1 #!/usr/local/bin/rune -x
3 # Demonstrate the use of compound types.
15 main(int ac, char **av)
19 (int a, int b = 7) t1 = (a:99);
20 (int a, int b) t2 = (b:90);
25 stdio.stdout->show(" x should be (0, 0): ", x.a, x.b);
26 stdio.stdout->show("t1 should be (99, 7): ", t1.a, t1.b);
27 stdio.stdout->show("t2 should be (0, 90): ", t2.a, t2.b);
28 stdio.stdout->show(" y should be (0, 7): ", y.a, y.b);
32 for (i = 0; i < x.b; ++i)
36 for (i = 0; i < y.b; ++i)
39 fs.write("xxxyyyyyyyyyyyyyyyyyyyy <-- should match\n", 42);
42 stdio.stdout->show(" x should be (55, 57): ", z.a, z.b);
50 # allow default for b to be returned
58 # maps to compound equivalance for Test (a, b),
67 # maps to compound equivalance for Test (a, b),