------------------------------------------------------------------------------
--
--  function In_List (spec)
--
--  This function checks if an item is present in a list.
--
------------------------------------------------------------------------------
--  Update information:
--
--  1996.07.07 (Jacob Sparre Andersen)
--    Written.
--
--  (Insert additional update information above this line.)
------------------------------------------------------------------------------

generic

   type Element_Type is private;
   type List_Type is array (Integer range <>) of Element_Type;

function In_List (Item : in Element_Type;
                  List : in List_Type) return Boolean;
------------------------------------------------------------------------------
--
--  function In_List (body)
--
--  This function checks if an item is present in a list.
--
------------------------------------------------------------------------------
--  Update information:
--
--  1996.07.07 (Jacob Sparre Andersen)
--    Written.
--
--  (Insert additional update information above this line.)
------------------------------------------------------------------------------

function In_List (Item : in Element_Type;
                  List : in List_Type) return Boolean is

begin --  In_List
   for Index in List'Range loop
      if Item = List (Index) then
         return True;
      end if;
   end loop;

   return False;
end In_List;

