|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 1870 (0x74e)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
-- TEST SHELL SORT USING X0SORT PACKAGE
with Instrument, X0sort;
use Instrument;
procedure Sorta2 is
type Int_Array is array (Integer range <>) of Integer;
package Int_Sort is new X0sort (Integer, Int_Array);
use Int_Sort;
My_List : Int_Array (1 .. 10);
begin
Start ("SORTA2", "SHELL--IN ORDER, REVERSE ORD, OUT OF ORDER " &
"(1000 REPETITIONS)");
for Lcv in 1 .. 1000 loop
for I in 1 .. 10 loop
My_List (I) := I;
end loop;
Shsort (My_List);
for I in 1 .. 10 loop
if
My_List (I) /= I
then
Comment ("DID NOT SORT THE NUMBERS PROPERLY FOR LIST IN ORD");
end if;
end loop;
My_List (1) := 10;
My_List (2) := 9;
My_List (3) := 8;
My_List (4) := 7;
My_List (5) := 6;
My_List (6) := 5;
My_List (7) := 4;
My_List (8) := 3;
My_List (9) := 2;
My_List (10) := 1;
Shsort (My_List);
for I in 1 .. 10 loop
if
My_List (I) /= I
then
Comment
("DIDN'T SORT THE NUMBERS RIGHT FOR LIST IN REVERSE ORDER");
end if;
end loop;
My_List (5) := 10;
My_List (3) := 9;
My_List (9) := 8;
My_List (8) := 7;
My_List (1) := 6;
My_List (2) := 5;
My_List (7) := 4;
My_List (4) := 3;
My_List (10) := 2;
My_List (6) := 1;
Shsort (My_List);
for I in 1 .. 10 loop
if
My_List (I) /= I
then
Comment ("DIDN'T SORT THE NUMBERS RIGHT FOR OUT OF ORDER LIST");
end if;
end loop;
end loop;
Stop;
end Sorta2;