home *** CD-ROM | disk | FTP | other *** search
- with array_type;
- with ada_io; use ada_io;
- procedure mtest is
- type rec is
- record
- a,b,c: integer;
- end record;
- package arrtyp is new array_type(integer, rec);
- use arrtyp;
- r: rec := (0,0,0);
- a: desc(1,20000);
- begin
- for i in a.first..a.last loop
- r.b := i;
- set(a, i, r);
- end loop;
- put_line("init done");
- for i in reverse a.first .. a.last loop
- if get(a, i).b /= i then
- put_line("fail");
- end if;
- end loop;
- put_line("pass");
- end;
-