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 - download
Index: ┃ B T

⟦066ebc587⟧ TextFile

    Length: 1626 (0x65a)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Text_Io;
package body Histogramme is  
    type Objet is
        record
            L_Element : Element;
            Sa_Quantite : Natural := 0;
        end record;
    H : array (1 .. Max) of Objet;

    procedure Initialiser is
        I : Integer;
    begin
        for I in 1 .. Max loop
            H (I).Sa_Quantite := 0;
        end loop;
    end Initialiser;


    procedure Ajouter (El : Element) is
        Existe : Boolean := False;
        Cardinalite : Positive := 1;
    begin  
        Cardinalite := 1;
        while not Existe and not Dernier_Element (Cardinalite) loop
            if H (Cardinalite).L_Element = El then
                Existe := True;
            end if;
            Cardinalite := Cardinalite + 1;  
        end loop;
        if Existe then
            H (Cardinalite).Sa_Quantite := H (Cardinalite).Sa_Quantite + 1;
        else
            H (Cardinalite).L_Element := El;
            H (Cardinalite).Sa_Quantite := 1;
        end if;
    end Ajouter;


    procedure Put is
        Cardinalite : Natural := 1;
    begin  
        Cardinalite := 1;
        Text_Io.Put_Line ("Classe    Quantite  Histogramme");
        Text_Io.Put_Line ("");
        while not Dernier_Element (Cardinalite) loop
            Text_Io.Put_Line ("Un element");
--            Text_Io.Put (H (Cardinalite).L_Element);
--            Text_Io.Put (H (Cardinalite).Sa_Quantite);
            Cardinalite := Cardinalite + 1;
        end loop;
    end Put;


    function Dernier_Element (Pos : Natural) return Boolean is
    begin
        return H (Pos).Sa_Quantite = 0;
    end Dernier_Element;
end Histogramme;