|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 7168 (0x1c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Number_Manager, seg_02615f, seg_026ce7
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧ └─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦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;
nblk1=6 nid=6 hdr6=8 [0x00] rec0=24 rec1=00 rec2=01 rec3=022 [0x01] rec0=07 rec1=00 rec2=02 rec3=00e [0x02] rec0=1e rec1=00 rec2=05 rec3=05c [0x03] rec0=0b rec1=00 rec2=03 rec3=000 [0x04] rec0=06 rec1=00 rec2=05 rec3=000 [0x05] rec0=05 rec1=00 rec2=04 rec3=000 tail 0x2152011aa83a56f1d18d7 0x42a00088462060003 Free Block Chain: 0x6: 0000 00 04 00 22 80 05 6c 6f 6f 70 3b 05 00 17 20 20 ┆ " loop; ┆ 0x4: 0000 00 00 00 54 80 01 3b 01 00 11 20 20 20 20 20 20 ┆ T ; ┆