This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/ada/test_ada2022.adb
Gustavo A. Hoffmann 0ac8a20677
Ada 2022: introducing support for new syntactic additions (#2121)
* Ada 2022: adding support for at sign
* Ada 2022: adding support for square brackets
* Ada 2022: introducing test for new syntactic additions
2022-04-29 16:26:15 +02:00

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;