fork download
  1. with Ada.Text_Io;
  2. procedure Day is
  3. type Day is ( Mon, Tue, Thu, Fri, Sat, Sun );
  4. subtype Weekday is Day range Mon .. Fri;
  5. X, Y : Day;
  6. begin
  7. X := Fri; Ada.Text_Io.Put (Day'Image(X));
  8. Y := Day'Succ(X); Ada.Text_Io.Put (Day'Image(Y));
  9. end Day;
Success #stdin #stdout 0.02s 1716KB
stdin
Standard input is empty
stdout
FRISAT