with Ada.Text_Io; use Ada; with Ada.Integer_Text_IO; with SimpleADT; use SimpleADT; procedure Privat2 is My_Data, Extra_Data : DATA_STRUCTURE; Temp : DATA_STRUCTURE; begin My_Data := Build_Structure(3, 7, 13); PrintData(My_Data); Extra_Data := Build_Structure(-4, 77, 0); PrintData(Extra_Data); My_Data := My_Data + Extra_Data; PrintData(My_Data); if My_Data /= Extra_Data then Ada.Text_IO.Put_Line("The two structures are not equal."); end if; -- Test set routine SimpleADT.SetElt(My_Data,1,23); PrintData(My_Data); -- Test get function Ada.Integer_Text_IO.Put(GetElt(My_Data,1)); Ada.Text_IO.Put_Line(""); My_Data := Extra_Data; if My_Data = Extra_Data then Ada.Text_IO.Put_Line("The two structures are equal now."); end if; -- The following line is illegal with the private type. -- My_Data.Value1 := My_Data.Value1 + 13; -- You can do this, although why is another matter. Temp := Build_Structure(13, 0, 0); end Privat2;