]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.chill/callch.ch
Initial creation of sourceware repository
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.chill / callch.ch
1 hack : module
2
3 dcl i int;
4 newmode otto = array (bool, bool) byte;
5 newmode str1 = struct (f1 int, f2 bool);
6 newmode str2 = struct (f1 otto);
7
8 dcl a otto := [[1,1],[1,1]];
9 dcl b str1 := [10, false];
10 dcl c str2;
11
12 fred : proc (a int in, b int loc);
13 writetext(stdout, "a is '%C'; b is '%C'.%/", a, b);
14 end fred;
15
16 klaus : proc ();
17 writetext(stdout, "here's klaus calling.%/");
18 end klaus;
19
20 king : proc (p otto loc, x otto in);
21 dcl i, j bool;
22 p := [[h'ff,h'ff],[h'ff,h'ff]];
23 do for i:= lower(bool) to upper(bool);
24 do for j:= lower(bool) to upper(bool);
25 writetext(stdout, "x(%C, %C) = %C%..%/", i, j, x(i, j));
26 writetext(stdout, "p(%C, %C) = %C%..%/", i, j, p(i, j));
27 od;
28 od;
29 end king;
30
31 ralph : proc (x str1 in);
32 writetext(stdout, "x.f1 = %C, x.f2 = %C%..%/", x.f1, x.f2);
33 end ralph;
34
35 whitney : proc (x str2 in);
36 dcl i, j bool;
37
38 do for i:= lower(bool) to upper(bool);
39 do for j:= lower(bool) to upper(bool);
40 writetext(stdout, "x.f1(%C, %C) = %C%..%/", i, j, x.f1(i, j));
41 od;
42 od;
43
44 end whitney;
45
46 c := [a];
47 i:=12;
48 writetext(stdout, "done.%/");
49
50 end hack;