xref: /csrg-svn/old/dbx/tests/mod/call.mod (revision 44111)
1*44111Sbostic(*
2*44111Sbostic * Test program for dbx call command.
3*44111Sbostic *)
4*44111Sbostic
5*44111Sbosticmodule main;
6*44111Sbosticfrom io import writef, output;
7*44111Sbostic
8*44111Sbosticvar global : integer;
9*44111Sbostic
10*44111Sbosticprocedure startup ;
11*44111Sbosticvar
12*44111Sbostic    mainlocal : integer;
13*44111Sbosticbegin
14*44111Sbostic    global := 2;
15*44111Sbostic    mainlocal := 19;
16*44111Sbostic    p1();
17*44111Sbostic    p2(mainlocal);
18*44111Sbostic    p3("test", 3);
19*44111Sbosticend startup;
20*44111Sbostic
21*44111Sbosticprocedure p1 ();
22*44111Sbosticbegin
23*44111Sbostic    writef(output, "in p1\n");
24*44111Sbostic    global := 4;
25*44111Sbosticend p1;
26*44111Sbostic
27*44111Sbosticprocedure p2 (frommain : integer);
28*44111Sbosticbegin
29*44111Sbostic    writef(output, "in p2(%d)\n", frommain);
30*44111Sbostic    global := 9;
31*44111Sbosticend p2;
32*44111Sbostic
33*44111Sbosticprocedure p3 (s : array of char; i : integer);
34*44111Sbosticbegin
35*44111Sbostic    writef(output, "in p3(%s, %d)\n", s, i);
36*44111Sbostic    global := 10;
37*44111Sbosticend p3;
38*44111Sbostic
39*44111Sbosticbegin
40*44111Sbostic    startup;
41*44111Sbosticend main.
42