-- Chapter 22 - Program 10 -- This provides a trivial test of the QDate and NDate packages to -- illustrate the use of inheritance, or extension as it is called -- in Ada. with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO; with QDate, QDate.NDate; use QDate, QDate.NDate; procedure Inherit4 is Today : QUICK_DATE; Count : INTEGER; begin Set_Date(Today, 17, 5, 1997); Count := Get_Day_Of_Year(Today); Put("The stored date is "); Put(Get_Day(Today), 2); Put("/"); Put(Get_Month(Today), 2); Put("/"); Put(Get_Year(Today), 4); New_Line; Put(" and it is day "); Put(Get_Day_Of_Year(Today), 1); Put(" of the year."); New_Line; end Inherit4; -- Result of execution -- -- The stored date is 17/ 5/1997 -- and it is day 137 of the year.