Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,14 +0,0 @@
|
|||
with Ada.Integer_Text_IO;
|
||||
use Ada.Integer_Text_IO;
|
||||
|
||||
procedure For_Each is
|
||||
|
||||
A : array (1..5) of Integer := (-1, 0, 1, 2, 3);
|
||||
|
||||
begin
|
||||
|
||||
for Num in A'Range loop
|
||||
Put( A (Num) );
|
||||
end loop;
|
||||
|
||||
end For_Each;
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
for Item of A loop
|
||||
Put( Item );
|
||||
end loop;
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
with Ada.Integer_Text_IO, Ada.Containers.Doubly_Linked_Lists;
|
||||
use Ada.Integer_Text_IO, Ada.Containers;
|
||||
|
||||
procedure Doubly_Linked_List is
|
||||
|
||||
package DL_List_Pkg is new Doubly_Linked_Lists (Integer);
|
||||
use DL_List_Pkg;
|
||||
|
||||
procedure Print_Node (Position : Cursor) is
|
||||
begin
|
||||
Put (Element (Position));
|
||||
end Print_Node;
|
||||
|
||||
DL_List : List;
|
||||
|
||||
begin
|
||||
|
||||
DL_List.Append (1);
|
||||
DL_List.Append (2);
|
||||
DL_List.Append (3);
|
||||
|
||||
-- Iterates through every node of the list.
|
||||
DL_List.Iterate (Print_Node'Access);
|
||||
|
||||
end Doubly_Linked_List;
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
with Ada.Integer_Text_IO, Ada.Containers.Vectors;
|
||||
use Ada.Integer_Text_IO, Ada.Containers;
|
||||
|
||||
procedure Vector_Example is
|
||||
|
||||
package Vector_Pkg is new Vectors (Natural, Integer);
|
||||
use Vector_Pkg;
|
||||
|
||||
procedure Print_Element (Position : Cursor) is
|
||||
begin
|
||||
Put (Element (Position));
|
||||
end Print_Element;
|
||||
|
||||
V : Vector;
|
||||
|
||||
begin
|
||||
|
||||
V.Append (1);
|
||||
V.Append (2);
|
||||
V.Append (3);
|
||||
|
||||
-- Iterates through every element of the vector.
|
||||
V.Iterate (Print_Element'Access);
|
||||
|
||||
end Vector_Example;
|
||||
Loading…
Add table
Add a link
Reference in a new issue