|
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: 7168 (0x1c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Enumeration_Array, seg_049245
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Text_Io, Enumeration, Generic_String_Sort_Array; package body Enumeration_Array is package Enum_Array is new Generic_String_Sort_Array (Element => Enumeration.Object, Max_Element_Number => 30, Null_Element => Enumeration.Null_Object, Get_Key => Enumeration.Name, Show_Element => Enumeration.Show); The_Array : Enum_Array.Object := Enum_Array.Null_Object; An_Enumeration : Enumeration.Object; procedure Put_Literal (Enumeration_Name, Literal_Name : in Identifier.Object; Ok : out Boolean) is An_Enumeration : Enumeration.Object; Local_Ok : Boolean; begin Enum_Array.Get (The_Array, An_Enumeration, Identifier.Image (Enumeration_Name), Local_Ok); if not Local_Ok then Enumeration.Put_Name (An_Enumeration, Enumeration_Name); end if; Enumeration.Put_Literal (An_Enumeration, Literal_Name, Local_Ok); if Local_Ok then Enum_Array.Put (The_Array, An_Enumeration); end if; Ok := Local_Ok; end Put_Literal; procedure Show is begin Text_Io.Put_Line ("Enumeration Array :"); Enum_Array.Show (The_Array); end Show; function Literal_Image (Enumeration_Index, Literal_Index : in Natural) return String is An_Enumeration : Enumeration.Object; Exist : Boolean; begin Enum_Array.Get (The_Array, An_Enumeration, Enumeration_Index, Exist); if Exist then return Enumeration.Literal_Image (An_Enumeration, Literal_Index); else return ""; end if; end Literal_Image; function Enum (Enumeration_Name : in String) return Natural is begin return Enum_Array.Index (The_Array, Enumeration_Name); end Enum; function Literal (Enumeration_Index : in Natural; Literal_Name : in String) return Natural is An_Enumeration : Enumeration.Object; Exist : Boolean; begin Enum_Array.Get (The_Array, An_Enumeration, Enumeration_Index, Exist); if Exist then return Enumeration.Literal (An_Enumeration, Literal_Name); else return 0; end if; end Literal; function Enumeration_Belong (Enumeration_Name : in String) return Boolean is begin return Enum_Array.Belong (The_Array, Enumeration_Name); end Enumeration_Belong; function Literal_Belong (Enumeration_Index : in Natural; Literal_Name : in String) return Boolean is An_Enumeration : Enumeration.Object; Exist : Boolean; begin Enum_Array.Get (The_Array, An_Enumeration, Enumeration_Index, Exist); if Exist then return Enumeration.Belong (An_Enumeration, Literal_Name); else return False; end if; end Literal_Belong; begin Enumeration.Put_Name (An_Enumeration, Identifier.From_String ("special")); Enum_Array.Put (The_Array, An_Enumeration); Enumeration.Put_Name (An_Enumeration, Identifier.From_String ("normal")); Enum_Array.Put (The_Array, An_Enumeration); end Enumeration_Array;
nblk1=6 nid=2 hdr6=a [0x00] rec0=1a rec1=00 rec2=01 rec3=010 [0x01] rec0=00 rec1=00 rec2=05 rec3=056 [0x02] rec0=22 rec1=00 rec2=04 rec3=046 [0x03] rec0=20 rec1=00 rec2=06 rec3=082 [0x04] rec0=10 rec1=00 rec2=03 rec3=000 [0x05] rec0=43 rec1=13 rec2=2b rec3=700 tail 0x21544ed3c8657738b1a6e 0x42a00088462060003 Free Block Chain: 0x2: 0000 00 00 01 d0 80 2b 74 69 6f 6e 2e 42 65 6c 6f 6e ┆ +tion.Belon┆