|
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: 9216 (0x2400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Constant_String, package body Operators, seg_02d0b1, seg_02d126, seg_0399ef, seg_03b93d, seg_03c0b5, seg_03c520, seg_03c6c7
└─⟦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 Constant_String is type Node; type Access_Node is access Node; type Node is -- a binary search tree record The_String : Object; Left, Right : Access_Node; end record; The_Root : Access_Node; procedure Make (From_Tree : in out Access_Node; For_String : String; The_Result : out Object) is The_String : Object; begin if From_Tree = null then The_String := new String'(For_String); From_Tree := new Node'(The_String, null, null); The_Result := The_String; elsif For_String < From_Tree.The_String.all then Make (From_Tree.Left, For_String, The_Result); elsif For_String /= From_Tree.The_String.all then Make (From_Tree.Right, For_String, The_Result); else The_Result := From_Tree.The_String; end if; end Make; function Value (For_String : String) return Object is Result : Object; begin Make (The_Root, For_String, Result); return Result; end Value; function Image (Of_Object : Object) return String is begin return Of_Object.all; end Image; procedure Put (The_Object : Object; Where : Output_Stream.Object) is use Output_Stream; begin Put (Image (The_Object), Where); end Put; procedure Put (At_Index : Positive; The_String : Object; Where : Output_Stream.Object) is use Output_Stream; begin if At_Index /= 1 then Put_Line (',', Where); end if; Put (At_Index, Where); Put (" => ", Where); Put ('"' & The_String.all & '"', Where); end Put; procedure Put (The_Tree : Access_Node; Where : Output_Stream.Object) is Index : Positive := 1; procedure R_Put (The_Tree : Access_Node; Where : Output_Stream.Object) is use Output_Stream; begin if The_Tree /= null then R_Put (The_Tree.Left, Where); Put (Index, The_Tree.The_String, Where); Index := Index + 1; R_Put (The_Tree.Right, Where); end if; end R_Put; begin Output_Stream.Put_Line ("Constant_String_Set'(", Where); Output_Stream.Indent (+2, Where); R_Put (The_Tree, Where); Output_Stream.Indent (-2, Where); Output_Stream.Put_Line (")", Where); end Put; procedure Put (Where : Output_Stream.Object) is begin Put (The_Tree => The_Root, Where => Where); end Put; package body Operators is function "<" (Left, Right : Object) return Boolean is begin return Left.all < Right.all; end "<"; function "<=" (Left, Right : Object) return Boolean is begin return Left.all <= Right.all; end "<="; function ">" (Left, Right : Object) return Boolean is begin return Left.all > Right.all; end ">"; function ">=" (Left, Right : Object) return Boolean is begin return Left.all >= Right.all; end ">="; end Operators; end Constant_String;
nblk1=8 nid=7 hdr6=a [0x00] rec0=1e rec1=00 rec2=01 rec3=008 [0x01] rec0=24 rec1=00 rec2=02 rec3=01e [0x02] rec0=01 rec1=00 rec2=03 rec3=03a [0x03] rec0=1f rec1=00 rec2=06 rec3=028 [0x04] rec0=12 rec1=00 rec2=05 rec3=000 [0x05] rec0=42 rec1=02 rec2=35 rec3=4ef [0x06] rec0=51 rec1=20 rec2=00 rec3=002 [0x07] rec0=08 rec1=40 rec2=46 rec3=7cf tail 0x2152609ec841544219c5a 0x42a00088462063c03 Free Block Chain: 0x7: 0000 00 04 00 04 80 01 20 01 02 03 6e 64 20 28 08 6c ┆ nd ( l┆ 0x4: 0000 00 08 03 fc 80 03 20 69 73 03 00 1c 20 20 20 20 ┆ is ┆ 0x8: 0000 00 00 00 0f 80 0c 20 20 20 20 20 20 20 20 20 43 ┆ C┆