The Ada Program: correspondence.adb

  1 -- correspondence.adb:  Ada program illustrating subprocedures
  2 
  3 with Ada.Text_IO, Ada.Integer_Text_IO;
  4 use Ada;
  5 
  6 procedure Correspondence is
  7 
  8     type Month_Type is (Jan, Feb, Mar, Apr, May, Jun,
  9        Jul, Aug, Sep, Oct, Nov, Dec);
 10 
 11     procedure Put (Day, Year: Integer; Month: Month_Type) is
 12     begin
 13         Text_IO.Put (Item => Month_Type'Image (Month));
 14         Integer_Text_IO.Put (Item => Day);
 15         Integer_Text_IO.Put (Item => Year);
 16         Text_IO.New_Line;
 17     end Put;
 18 
 19 begin
 20 
 21     Put (10, 1998, Oct);
 22     Put (Month=>Oct, Day=>10, Year=>1998);
 23 
 24 end Correspondence;