summaryrefslogtreecommitdiff
path: root/tests/examplefiles/ada/test_ada2022.adb
blob: 033c219b98cf9fc2724208cacd13d025656741d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
with Ada.Text_IO;            use Ada.Text_IO;
with Ada.Containers.Vectors;

procedure Test_Ada2022 is

   package Integer_Vectors is new
     Ada.Containers.Vectors
       (Index_Type   => Natural,
        Element_Type => Integer);

   use Integer_Vectors;

   procedure Increment_All (V : in out Vector) is
   begin
      for E of V loop
         E := @ + 1;
      end loop;
   end Increment_All;

   V : Vector := [0, 0, 0];

begin

   Increment_All (V);
   Put_Line (V'Image);

end Test_Ada2022;