xref: /csrg-svn/old/dbx/tests/mod/nested.mod (revision 44123)
1*44123Sbostic(*
2*44123Sbostic * Test of nested procedures and modules.
3*44123Sbostic *)
4*44123Sbostic
5*44123Sbosticmodule main;
6*44123Sbosticvar
7*44123Sbostic    i, k : integer;
8*44123Sbostic
9*44123Sbosticprocedure p (var i : integer);
10*44123Sbosticvar
11*44123Sbostic    j, k : integer;
12*44123Sbostic
13*44123Sbostic    procedure nestedp (var j : integer);
14*44123Sbostic    var
15*44123Sbostic	i : integer;
16*44123Sbostic    begin
17*44123Sbostic	i := j + 2;
18*44123Sbostic	j := i;
19*44123Sbostic    end nestedp;
20*44123Sbostic
21*44123Sbosticbegin
22*44123Sbostic    j := i + 1;
23*44123Sbostic    nestedp(j);
24*44123Sbostic    i := j;
25*44123Sbosticend p;
26*44123Sbostic
27*44123Sbosticbegin
28*44123Sbostic    i := 3;
29*44123Sbostic    p(i);
30*44123Sbosticend main.
31