home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
pub
/
users
/
Harry
/
compilers
/
p10
/
tst
/
array2.pcat
< prev
next >
Wrap
Text File
|
2006-02-17
|
811b
|
34 lines
(* This program tests IR code generation for array constructors. *)
program is
var a1, a2, a3, a4, a5: T1 := nil;
b1: B1 := nil;
c1: T2 := nil;
x: real := 0.0;
i: integer := 0;
type T1 is array of integer;
type T2 is array of T1;
type B1 is array of real;
begin
a1 := T1 {{ 11, 12, 13, 14, 15 }};
b1 := B1 {{ 1.1, 1.2, 1.3, 1.4, 1.5 }};
a2 := T1 {{ i*11, i*12, i*13, i*14, i*15 }};
a3 := T1 {{ 100 of 11111, 200 of 22222, 300 of 33333, 400 of 44444 }};
a3 := T1 {{ 100*i of 11111, 200*i of 22222, 300*i of 33333 }};
a4 := T1 {{ 100 of 11111, 22222, 33333, 400 of 44444, 555555 }};
a5:= T1 {{ i*100 of 111, 222, 333, i*400 of 444, 555 }};
c1 := T2 {{ a1, a2, 100 of a3, 200*i of a4, a5 }};
end;