DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦c45158c17⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Histogrammes, seg_02d304

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



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;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=1e rec1=00 rec2=01 rec3=03e
        [0x01] rec0=0c rec1=00 rec2=02 rec3=001
    tail 0x21526438e843f58240699 0x42a00088462060003