DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦cfcb71383⟧ TextFile

    Length: 898 (0x382)
    Types: TextFile
    Names: »B«

Derivation

└─⟦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⟧ 

TextFile

package body X0sort is

    procedure Swap (A, B : in out Element_Type) is
        Temp : Element_Type;
    begin
        Temp := A;
        A := B;
        B := Temp;
    end Swap;

    procedure Shsort (List : in out Vector) is
        L : Integer := List'First + 1;
        R, K : Integer := List'Last;
        X : Element_Type;
    begin
        loop
            for J in reverse L .. R loop
                if List (J - 1) > List (J) then
                    Swap (List (J - 1), List (J));
                    K := J;
                end if;
            end loop;
            L := K + 1;
            for J in L .. R loop
                if List (J - 1) > List (J) then
                    Swap (List (J - 1), List (J));
                    K := J;
                end if;
            end loop;
            R := K - 1;
            exit when L > R;
        end loop;
    end Shsort;

end X0sort;