fork download
  1. with Ada.Text_IO; use Ada.Text_IO;
  2. with Ada.Containers.Ordered_Maps;
  3.  
  4. procedure Program is
  5. package Maps is new Ada.Containers.Ordered_Maps(Integer,Integer);
  6.  
  7. Map : Maps.Map;
  8.  
  9. begin
  10.  
  11. Map.Insert(1,10);
  12. Map.Insert(2,20);
  13. Map.Insert(3,30);
  14. Map.Insert(4,40);
  15.  
  16. for Element of Map loop
  17. Put_Line(Element'Image);
  18. end loop;
  19. end Program;
Success #stdin #stdout 0.01s 5524KB
stdin
Standard input is empty
stdout
 10
 20
 30
 40