Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. with Ada.Text_Io; use Ada.Text_Io;
  2. with Ada.Integer_Text_Io; use Ada.Integer_Text_Io;
  3.  
  4.  
  5. package Time_Handling is
  6. type Date_Type is private;
  7. procedure Get(Time: out Date_Type);
  8. procedure Put(Time: in Date_Type);
  9. function Next_Date (Tid : in Date_Type) return Date_Type;
  10. function Previous_Date (Tid : in Date_Type) return Date_Type;
  11. function ">" (Left, Right : in Date_Type) return Boolean;
  12. function "<" (Left, Right : in Date_Type) return Boolean;
  13. function "=" (Left, Right : in Date_Type) return Boolean;
  14. Day_Error : Exception;
  15. Month_Error : exception;
  16. Year_Error : exception;
  17.  
  18.  
  19. private
  20. -- type Date_Type is
  21. -- record
  22. -- Y : Integer;
  23. -- M : Integer;
  24. -- D : Integer;
  25. -- C : Character;
  26. -- end record;
  27.  
  28. type Date_Type is
  29. array (1..3) of Integer;
  30.  
  31.  
  32. end Time_Handling;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement