with Text_io; use Text_io; with IIO; use IIO; with INTEGER_SETS; use integer_sets; procedure TESTSETS is ACTION:character; INPUT:integer; SET:INTEGER_SET; procedure HINT is begin Put_line("Input q to quit, e to empty, i to input an integer"); Put_line("p to print, g to get the first item out, m to test mebership"); Put_Line("t to take an input number out"); end HINT; procedure Put(P:boolean) is -- an alternative to this is to use boolean'image begin if P then Put(" true "); else Put(" false "); end if; end Put; begin HINT; loop Get(ACTION); case ACTION is when 'q'|'x' => exit; when 'e' => Make_Empty(SET); when 'i' => Get(INPUT); Put(INPUT,INTO=>SET); when 'm' => Get(INPUT); Put(MEMBER(INPUT,SET)); when 'g' => GetMIN(INPUT,FROM=>SET); IIO.Put(INPUT); Put(" "); when 't' => GET(INPUT);take(INPUT,FROM=>SET); when 'o'|'p' => Put(SET); when others => HINT; end case; Put("SET = ");Put(SET);new_line; Put("Empty(SET) is");put(Empty(SET)); New_line; put("qimgtoe? "); end loop; end TESTSETS;