* Ada 2022: adding support for at sign * Ada 2022: adding support for square brackets * Ada 2022: introducing test for new syntactic additions
27 lines
499 B
Ada
27 lines
499 B
Ada
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;
|