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

⟦ba23a75a3⟧ TextFile

    Length: 1937 (0x791)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

package body Nombres is

    package Behavior is new Classbehavior (Object, "NUMBERS   ");


    procedure Mult (R : Reference) is
        Unnombre : Object;
    begin
        -- effet de bord : resInter augmente
        Unnombre := Behavior.Get (R);
        Resinter := Resinter * Unnombre.Courant;
        Unnombre.Resultat := Resinter;
        Behavior.Set (R, Unnombre);
    end Mult;



    function Dernier (Lameilleure, Uneautre : Reference) return Boolean is
    begin
        return (Behavior.Get (Lameilleure).Resultat >
                Behavior.Get (Uneautre).Resultat);
    end Dernier;

    function Leresultat000 is new Collection.Themost (Dernier);

    function Leresultat (C : Collection.Object) return Reference is
    begin
        return (Leresultat000 (C));
    end Leresultat;

    -- partage de unNombre entre butAtteint et continuer
    function Butatteint return Boolean is
    begin
        Unnombre := Behavior.Get (Refnombrecourant);
        return (Unnombre.Courant = Unnombre.But);
    end Butatteint;

    procedure Continuer is
    begin
        Unnombre.Courant := Unnombre.Courant + 1;
        Refnombrecourant := Behavior.Allocate (Unnombre);
    end Continuer;


    procedure Calculfact is new Collection.Forall (Mult);

    procedure Calculerfact is
    begin
        Calculfact (Behavior.Instances);
    end Calculerfact;

    procedure Afficherfact is
    begin
        Put_Line (" ");
        Put ("Resultat factoriel: ");

        Refnombrecourant := Leresultat (Behavior.Instances);

        Put (Behavior.Get (Refnombrecourant).Resultat);
        Put_Line (" ");

    end Afficherfact;

    procedure Enroute is
    begin

        Unnombre.But := 7;
        Resinter := 1;

        Refnombrecourant := Behavior.Allocate (Unnombre);
        Put_Line (" ");
        Put (" Calcul de factorielle de : ");
        Put (Unnombre.But);
        Put_Line (" ... ");

    end Enroute;

end Nombres;