fork download
  1. With Ada.Text_IO; Use Ada.Text_IO;
  2. With Ada.Integer_Text_IO; Use Ada.Integer_Text_IO;
  3.  
  4. procedure Program is
  5. val: Integer;
  6. begin
  7. val := 5;
  8.  
  9. case val is
  10. when 1 =>
  11. Ada.Text_IO.Put_Line ("1");
  12.  
  13. when 5 =>
  14. Ada.Text_IO.Put_Line ("5");
  15.  
  16. when 8 | 10 =>
  17. Ada.Text_IO.Put_Line ("8 | 10");
  18.  
  19. when others =>
  20. Ada.Text_IO.Put_Line ("else");
  21.  
  22. end case;
  23. end Program;
Success #stdin #stdout 0s 5760KB
stdin
Standard input is empty
stdout
5