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

⟦3eda6cfbd⟧ TextFile

    Length: 1252 (0x4e4)
    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

package body Histogrammes is
    procedure Initialiser_Objet (O : in out Objet) is
    begin
        O.Quantite_Totale := 0;
        for I in O.Table'Range loop
            O.Table (I) := 0;
        end loop;
    end Initialiser_Objet;


    procedure Ajouter_Une_Quantite (O : in out Objet; C : in Classe) is
    begin
        O.Table (C) := O.Table (C) + 1;
        O.Quantite_Totale := O.Quantite_Totale + 1;
    end Ajouter_Une_Quantite;


    procedure Put_Histo (O : in Objet) is
        package Enum is new Text_Io.Enumeration_Io (Classe);
        package Entier is new Text_Io.Integer_Io (Natural);  
        Taille : Natural := 0;
        Chaine : String (1 .. 30);
    begin
        Text_Io.Put_Line ("Classe              Quantite                Histo");
        for I in O.Table'Range loop
            if O.Table (I) /= 0 then
                Text_Io.Put (Classe'Image (I));
                Text_Io.Put ("       ");
                Entier.Put (O.Table (I));
                Text_Io.Put ("       ");

                Taille := Natural (30 * O.Table (I) / O.Quantite_Totale);
                Chaine := (1 .. Taille => '*');
                Text_Io.Put_Line (Chaine);


            end if;
        end loop;
    end Put_Histo;
end Histogrammes;