xref: /csrg-svn/old/dbx/tests/pc/call.p (revision 44152)
1*44152Sbostic(*
2*44152Sbostic * Test program for dbx call command.
3*44152Sbostic *)
4*44152Sbostic
5*44152Sbosticprogram calltest (input, output);
6*44152Sbostic
7*44152Sbostictype String = array [1..4] of char;
8*44152Sbosticvar global : integer;
9*44152Sbostic
10*44152Sbosticprocedure p1 ;
11*44152Sbosticbegin
12*44152Sbostic    writeln(output, 'in p1');
13*44152Sbostic    global := 4;
14*44152Sbosticend;
15*44152Sbostic
16*44152Sbosticprocedure p2 (frommain : integer);
17*44152Sbosticbegin
18*44152Sbostic    writeln(output, 'in p2(', frommain:1, ')');
19*44152Sbostic    global := 9;
20*44152Sbosticend;
21*44152Sbostic
22*44152Sbosticprocedure p3 (s : String; i : integer);
23*44152Sbosticbegin
24*44152Sbostic    writeln(output, 'in p3(', s, ', ', i:1, ')');
25*44152Sbostic    global := 10;
26*44152Sbosticend;
27*44152Sbostic
28*44152Sbosticprocedure startup ;
29*44152Sbosticvar
30*44152Sbostic    mainlocal : integer;
31*44152Sbosticbegin
32*44152Sbostic    global := 2;
33*44152Sbostic    mainlocal := 19;
34*44152Sbostic    p1;
35*44152Sbostic    p2(mainlocal);
36*44152Sbostic    p3('test', 3);
37*44152Sbosticend;
38*44152Sbostic
39*44152Sbosticbegin
40*44152Sbostic    startup;
41*44152Sbosticend.
42