Code :
procedure Tree_Loader(Table : in table_access; B_Inf, B_Sup : in out Natural) is Coded_Word : T_Coded_Word; Midle : Natural := B_Inf + ((B_Sup - B_Inf)/ 2); New_B_Inf : Natural; New_B_Sup : Natural; begin if Midle+1 < B_sup then New_B_inf := Midle+1; Tree_Loader(Table => Table, B_Inf => New_B_Inf, B_Sup => B_sup); end if; Coded_Word := Table(Midle); Put_Line(To_String(Coded_Word.Word)); Code_To_Word.Add(Coded_Word, Univers(Number_Of_Dictionary).To_Word); Word_To_Code.Add(Coded_Word, Univers(Number_Of_Dictionary).To_Code); if B_inf < Midle-1 then New_B_sup := Midle-1; Tree_Loader(Table => Table, B_Inf => B_inf, B_Sup => New_B_sup); end if; end Tree_Loader;
|