Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,5 @@
type Grade is range 0..100;
subtype Lower_Case is Character range 'a'..'z';
subtype Natural is Integer range 0..Integer'Last;
subtype Positive is Integer range 1..Integer'Last;
type Deflection is range -180..180;

View file

@ -0,0 +1,4 @@
Mat1 : Matrix;
Mat2 : Matrix;
...
Mat1 := Mat2;

View file

@ -0,0 +1,4 @@
V1 : Vector := (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
V2 : Vector := (2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
...
V2(3..6) := V1(7..10);

View file

@ -0,0 +1,8 @@
function "*" (Left : Vector; Right : Integer) return Vector is
Result : Vector;
begin
for I in Vector'Range loop
Result(I) := Left(I) * Right;
end loop;
return Result;
end "*"

View file

@ -0,0 +1,12 @@
type Unconstrained_Vector is array (Positive range <>) of Integer;
U1 : Unconstrained_Vector := (1,2,3,4,5,6,7,8,9,10);
U2 : Unconstrained_Vector := (10,11,12,13);
...
function "*" (Left : Unconstrained_Vector; Right : Integer) return Unconstrained_Vector is
Result : Unconstrained_Vector(Left'Range);
begin
for I in Left'Range loop
Result(I) := Left(I) * Right;
end loop;
return Result;
end "*";

View file

@ -0,0 +1,2 @@
type Char_Array is array (0..9) of Character; -- A constrained array of characters
type String is array (Positive range <>) of Character; -- An unconstrained array of characters

View file

@ -0,0 +1 @@
subtype Positive is Integer range 1..Integer'Last;

View file

@ -0,0 +1 @@
Name : String := "Rosetta Code";

View file

@ -0,0 +1 @@
Num_Elements : Natural := Char_Array'Length;

View file

@ -0,0 +1,2 @@
type Vector is array (1..10) of Integer;
type Table is array (0..99) of Vector;

View file

@ -0,0 +1,3 @@
V : Vector;
...
V(2) := 10;

View file

@ -0,0 +1,3 @@
T : Table;
...
T(1)(2) := 10;

View file

@ -0,0 +1,4 @@
type Matrix is array (0..99, 1..10) of Integer;
M : Matrix;
...
M(1,2) := 10;