new files

This commit is contained in:
Ingy döt Net 2013-04-10 12:38:42 -07:00
parent 3af7344581
commit 86c034bb8b
1364 changed files with 21352 additions and 0 deletions

View file

@ -0,0 +1,11 @@
procedure Array_Collection is
A : array (-3 .. -1) of Integer := (1, 2, 3);
begin
A (-3) := 3;
A (-2) := 2;
A (-1) := 1;
end Array_Collection;

View file

@ -0,0 +1,12 @@
procedure Array_Collection is
type Array_Type is array (1 .. 3) of Integer;
A : Array_Type := (1, 2, 3);
begin
A (1) := 3;
A (2) := 2;
A (3) := 1;
end Array_Collection;

View file

@ -0,0 +1,13 @@
procedure Array_Collection is
type Array_Type is array (positive range <>) of Integer; -- may be indexed with any positive
-- Integer value
A : Array_Type(1 .. 3); -- creates an array of three integers, indexed from 1 to 3
begin
A (1) := 3;
A (2) := 2;
A (3) := 1;
end Array_Collection;

View file

@ -0,0 +1,17 @@
with Ada.Containers.Doubly_Linked_Lists;
use Ada.Containers;
procedure Doubly_Linked_List is
package DL_List_Pkg is new Doubly_Linked_Lists (Integer);
use DL_List_Pkg;
DL_List : List;
begin
DL_List.Append (1);
DL_List.Append (2);
DL_List.Append (3);
end Doubly_Linked_List;

View file

@ -0,0 +1,17 @@
with Ada.Containers.Vectors;
use Ada.Containers;
procedure Vector_Example is
package Vector_Pkg is new Vectors (Natural, Integer);
use Vector_Pkg;
V : Vector;
begin
V.Append (1);
V.Append (2);
V.Append (3);
end Vector_Example;