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

⟦294ae0918⟧ TextFile

    Length: 1217 (0x4c1)
    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 Bonus is

    The_Minimum_Value : constant := 0.5;
    The_Maximum_Value : constant := 3.5;

    The_Improve_Factor : constant := 0.95;
    The_Reduce_Factor : constant := 1.25;

    procedure Constrain_Value_For (The_Bonus : in out Bonus.Object) is
    begin
        if The_Bonus.Value < The_Minimum_Value then
            The_Bonus.Value := The_Minimum_Value;
        elsif The_Bonus.Value > The_Minimum_Value then
            The_Bonus.Value := The_Maximum_Value;
        end if;
    end Constrain_Value_For;

    procedure Set (The_Bonus : in out Bonus.Object; Using_Value : Float) is
    begin
        The_Bonus.Value := Using_Value;
        Constrain_Value_For (The_Bonus);
    end Set;

    function Get (The_Bonus : Bonus.Object) return Float is
    begin
        return The_Bonus.Value;
    end Get;

    procedure Improve (The_Bonus : in out Bonus.Object) is
    begin
        The_Bonus.Value := The_Bonus.Value * The_Improve_Factor;
        Constrain_Value_For (The_Bonus);
    end Improve;

    procedure Reduce (The_Bonus : in out Bonus.Object) is
    begin
        The_Bonus.Value := The_Bonus.Value * The_Reduce_Factor;
        Constrain_Value_For (The_Bonus);
    end Reduce;


end Bonus;