home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / programming / misc_programming / TEST / GMAIN.ADA < prev    next >
Encoding:
Text File  |  1990-06-28  |  419 b   |  18 lines

  1. with ada_io; use ada_io;
  2. with gsort;
  3. procedure gmain is
  4.   type color is (red, yellow, blue);
  5.   type day is (mon, tue, wed, thu, fri);
  6.   type vect is array(day range <>) of color;
  7.   x: vect(tue..fri) := (yellow, blue, red, yellow);
  8.   procedure put(c: color) is
  9.   begin
  10.     put(color'image(c));
  11.   end;
  12.   package s is new gsort(day, color, vect, ">", put);
  13. begin
  14.   s.put(x);
  15.   s.sort(x);
  16.   s.put(x);
  17. end;
  18.