home *** CD-ROM | disk | FTP | other *** search
- with ada_io; use ada_io;
- with gsort;
- procedure gmain is
- type color is (red, yellow, blue);
- type day is (mon, tue, wed, thu, fri);
- type vect is array(day range <>) of color;
- x: vect(tue..fri) := (yellow, blue, red, yellow);
- procedure put(c: color) is
- begin
- put(color'image(c));
- end;
- package s is new gsort(day, color, vect, ">", put);
- begin
- s.put(x);
- s.sort(x);
- s.put(x);
- end;
-