-- Illustrates:
-- declaring types and variables
-- relational operators and in
with Ada.Text_io; use Ada.Text_io;
procedure enum1 is
type Day is (Sunday, Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday);
today: Day;
begin
today := Thursday;
if today = Friday then
put("We made it!");
end if;
for d in Sunday .. Saturday loop
if d in Monday .. Friday then
put("It's a work day.");
if d = Monday then
put("The first of the week.");
end if;
else
put("It's the weekend!");
end if;
end loop;
end enum1;