|
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 - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Recency, seg_03c32b, seg_03c543, seg_03c6e3
└─⟦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⟧
package body Recency is Current_Size : Size_Type := 1; Current_Object : Object; function "<" (Left, Right : Object) return Boolean is begin if Left.Size < Right.Size then return True; elsif Left.Size > Right.Size then return False; else for Index in reverse 1 .. Left.Size loop if Left.The_Value (Index) < Right.The_Value (Index) then return True; elsif Left.The_Value (Index) > Right.The_Value (Index) then return False; else null; end if; end loop; return False; end if; end "<"; function ">" (Left, Right : Object) return Boolean is begin if Left.Size > Right.Size then return True; elsif Left.Size < Right.Size then return False; else for Index in reverse 1 .. Left.Size loop if Left.The_Value (Index) > Right.The_Value (Index) then return True; elsif Left.The_Value (Index) < Right.The_Value (Index) then return False; else null; end if; end loop; return False; end if; end ">"; procedure Initialize is begin Current_Size := 1; Current_Object := Object'(Size => Current_Size, The_Value => (others => 1)); end Initialize; procedure Get (The_Recency : out Object) is begin The_Recency := Current_Object; end Get; procedure Recursive_Increase (Index : Size_Type) is begin if Current_Object.The_Value (Index) < Max_Recency_Value then Current_Object.The_Value (Index) := Current_Object.The_Value (Index) + 1; else if Index = Current_Size then Current_Size := Current_Size + 1; Current_Object := Object'(Size => Current_Size, The_Value => (others => 1)); else Current_Object.The_Value (Index) := 1; Recursive_Increase (Index + 1); end if; end if; end Recursive_Increase; procedure Increase is begin Recursive_Increase (1); end Increase; procedure Put (The_Object : Object; Where : Output_Stream.Object) is use Output_Stream; begin Put ("[ ", Where); for I in 1 .. The_Object.Size - 1 loop Put (Recency_Number'Image (The_Object.The_Value (I)), Where); Put (", ", Where); end loop; Put (Recency_Number'Image (The_Object.The_Value (The_Object.Size)), Where); Put (" ]", Where); end Put; begin Initialize; end Recency;
nblk1=4 nid=0 hdr6=8 [0x00] rec0=24 rec1=00 rec2=01 rec3=008 [0x01] rec0=20 rec1=00 rec2=03 rec3=010 [0x02] rec0=1d rec1=00 rec2=04 rec3=00a [0x03] rec0=08 rec1=00 rec2=02 rec3=000 tail 0x2173a66b085824c7126ac 0x42a00088462063c03