|
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_043903
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦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; 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; end Enumeration_Array;
nblk1=6 nid=5 hdr6=a [0x00] rec0=19 rec1=00 rec2=01 rec3=066 [0x01] rec0=22 rec1=00 rec2=04 rec3=046 [0x02] rec0=03 rec1=00 rec2=06 rec3=020 [0x03] rec0=1f rec1=00 rec2=03 rec3=034 [0x04] rec0=06 rec1=00 rec2=02 rec3=000 [0x05] rec0=43 rec1=13 rec2=2b rec3=700 tail 0x217446c308637398db8f1 0x42a00088462060003 Free Block Chain: 0x5: 0000 00 00 01 00 80 12 20 20 20 20 20 20 20 20 72 65 ┆ re┆