|
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 Counters, seg_0459aa
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Tree, String_Utilities, Unbounded_String; package body Counters is package Identifier is new Unbounded_String (1); type Counter is record Name : Identifier.Variable_String; Value : Integer; end record; --------------------- function "<" (Left, Right : Counter) return Boolean is begin return String_Utilities.Less_Than (Identifier.Image (Left.Name), Identifier.Image (Right.Name)); end "<"; function ">" (Left, Right : Counter) return Boolean is begin return String_Utilities.Greater_Than (Identifier.Image (Left.Name), Identifier.Image (Right.Name)); end ">"; package Counter_Tree is new Tree (Element => Counter, Nb_Preallocation_Node => 10); --------------------- procedure Create (Name : String; Value : Integer := 0) is The_Counter : Counter; begin The_Counter.Name := Identifier.Value (Name); The_Counter.Value := Value; Counter_Tree.Insert (The_Counter); end Create; procedure Set_Value (Name : String; Value : Integer) is The_Counter : Counter; begin The_Counter.Name := Identifier.Value (Name); The_Counter.Value := Value; if Counter_Tree.Find (The_Counter) then Counter_Tree.Set_Current_Element (The_Counter); end if; end Set_Value; function Get_Value (Name : String) return Integer is The_Counter : Counter; begin The_Counter.Name := Identifier.Value (Name); if Counter_Tree.Find (The_Counter) then The_Counter := Counter_Tree.Get_Current_Element; return The_Counter.Value; end if; end Get_Value; function Exists (Name : String) return Boolean is The_Counter : Counter; begin The_Counter.Name := Identifier.Value (Name); return Counter_Tree.Find (The_Counter); end Exists; end Counters;
nblk1=6 nid=4 hdr6=6 [0x00] rec0=25 rec1=00 rec2=01 rec3=03c [0x01] rec0=1e rec1=00 rec2=05 rec3=046 [0x02] rec0=05 rec1=00 rec2=03 rec3=000 [0x03] rec0=14 rec1=00 rec2=03 rec3=000 [0x04] rec0=0a rec1=00 rec2=02 rec3=000 [0x05] rec0=43 rec1=09 rec2=36 rec3=23b tail 0x215420b26864b7fb9f168 0x42a00088462060003 Free Block Chain: 0x4: 0000 00 02 03 fc 80 2b 20 4d 79 5f 54 72 65 65 2e 49 ┆ + My_Tree.I┆ 0x2: 0000 00 06 00 e0 80 07 6e 64 20 74 68 65 6e 07 00 1f ┆ nd then ┆ 0x6: 0000 00 00 00 2a 80 03 65 72 3b 03 00 09 20 20 20 20 ┆ * er; ┆