xref: /csrg-svn/old/dbx/tests/mod/arrays.mod (revision 44107)
1*44107Sbosticmodule main;
2*44107Sbostictype
3*44107Sbostic    Color = (RED, BLUE, GREEN);
4*44107Sbosticvar
5*44107Sbostic    a : array [1..10] of integer;
6*44107Sbostic    i : integer;
7*44107Sbostic    b : array Color of integer;
8*44107Sbostic    c : Color;
9*44107Sbostic
10*44107Sbosticprocedure p (i : integer; var a : array of integer; j : integer);
11*44107Sbosticbegin
12*44107Sbostic    a[3] := i;
13*44107Sbostic    a[4] := j;
14*44107Sbosticend p;
15*44107Sbostic
16*44107Sbosticbegin
17*44107Sbostic    for i := 1 to 10 do
18*44107Sbostic	a[i] := i;
19*44107Sbostic    end;
20*44107Sbostic    p(4, a, 5);
21*44107Sbostic    b[BLUE] := 3;
22*44107Sbostic    c := RED;
23*44107Sbosticend main.
24