|  | DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes | 
This is an automatic "excavation" of a thematic subset of
 See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. | 
top - metrics - downloadIndex: B T
    Length: 2250 (0x8ca)
    Types: TextFile
    Names: »B«
└─⟦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⟧ 
with Text_Io;
package body Number_Manager is
    Number_Table : array (From .. To) of Element;
    procedure Init_Number is
    begin
        Text_Io.Put_Line ("number_manager.init : from : " &
                          Number_Range'Image (From) &
                          " to : " & Number_Range'Image (To));
        for I in From .. To loop
            Number_Table (I) := Free_Element;
        end loop;
    end Init_Number;
    procedure Allocate (Value : in Element;
                        Number : out Number_Range;
                        Success : out Boolean) is
        Found : Boolean := False;
        I : Number_Range := From;  
    begin  
        Show_Number_Status;
        for I in From .. To loop
            if Number_Table (I) = Free_Element then
                Number_Table (I) := Value;
                Found := True;
                Number := I;
            end if;
            exit when Found;
        end loop;
        Success := Found;
    exception
        when Numeric_Error =>
            Text_Io.Put_Line ("Exception : Numeric_Error");
            Success := False;
        when others =>
            Text_Io.Put_Line ("Exception OTHERS: in Number_Manager.Allocate");
            Success := False;
    end Allocate;
    procedure Deallocate (Number : in Number_Range) is
    begin
        Number_Table (Number) := Free_Element;
    end Deallocate;
    procedure Show_Number_Status is
    begin
        Text_Io.Put_Line ("------------- Number allocator ---------------");
        Text_Io.Put ("From : " & Number_Range'Image (From) &
                     "  to : " & Number_Range'Image (To));
        for I in From .. To loop
            Text_Io.Put_Line ("Number " & Number_Range'Image (I) &
                              Ascii.Ht & Element_Image (Number_Table (I)));
        end loop;
    end Show_Number_Status;
    procedure Show_Value (Number : in Number_Range;
                          Value : out Element;
                          Success : out Boolean) is
    begin  
        if Number_Table (Number) /= Free_Element then
            Success := True;
        else
            Success := False;
        end if;
        Value := Number_Table (Number);
    end Show_Value;
end Number_Manager;