|
|
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 Field_Identifier_Array, seg_045830, seg_047dc5, seg_047fe5, seg_048630
└─⟦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⟧
with Text_Io;
package body Field_Identifier_Array is
subtype Element_Index is Natural range 0 .. 300;
type Unconstraint_Array is
array (Element_Index range <>) of Identifier.Object;
Null_Unconstraint_Array : constant Unconstraint_Array (1 .. 0) :=
(others => Identifier.Null_Object);
type Variable_Array (Length : Element_Index := 0) is
record
Inner : Unconstraint_Array (1 .. Length) := Null_Unconstraint_Array;
end record;
The_Array : Variable_Array;
procedure Put (Field_Identifier : in Identifier.Object) is
Temporary_Unconstraint_Array : Unconstraint_Array
(1 .. The_Array.Inner'Last + 1);
begin
if Index (Identifier.Image (Field_Identifier)) = 0 then
Temporary_Unconstraint_Array := The_Array.Inner & Field_Identifier;
The_Array := (Length => The_Array.Length + 1,
Inner => Temporary_Unconstraint_Array);
end if;
end Put;
procedure Show is
begin
Text_Io.Put_Line ("Field Identifier Array : ");
for I in The_Array.Inner'Range loop
Identifier.Show (The_Array.Inner (I));
end loop;
end Show;
function Number_Of return Natural is
begin
return The_Array.Length;
end Number_Of;
function Is_Empty return Boolean is
begin
return The_Array.Length = 0;
end Is_Empty;
function Belong (Field_Name : in String) return Boolean is
begin
return Index (Field_Name) /= 0;
end Belong;
function Index (Field_Name : in String) return Natural is
An_Index : Natural := 1;
Found : Boolean := False;
begin
if not Is_Empty then
while (An_Index < The_Array.Length) and then
(Identifier.Image (The_Array.Inner (An_Index)) /=
Field_Name) loop
An_Index := An_Index + 1;
end loop;
if Identifier.Image (The_Array.Inner (An_Index)) = Field_Name then
return An_Index;
end if;
end if;
return 0;
end Index;
function Image (Field_Index : in Natural) return String is
begin
if (Field_Index > 0) and (Field_Index <= The_Array.Length) then
return Identifier.Image (The_Array.Inner (Field_Index));
else
return "";
end if;
end Image;
end Field_Identifier_Array;
nblk1=6
nid=6
hdr6=6
[0x00] rec0=1d rec1=00 rec2=01 rec3=03a
[0x01] rec0=28 rec1=00 rec2=04 rec3=018
[0x02] rec0=15 rec1=00 rec2=02 rec3=000
[0x03] rec0=14 rec1=00 rec2=02 rec3=000
[0x04] rec0=13 rec1=00 rec2=06 rec3=000
[0x05] rec0=43 rec1=1a rec2=9a rec3=522
tail 0x217476420864b679ab49a 0x42a00088462060003
Free Block Chain:
0x6: 0000 00 05 02 c8 00 43 20 20 20 20 20 20 20 20 20 20 ┆ C ┆
0x5: 0000 00 03 02 4e 80 13 54 68 65 5f 41 72 72 61 79 2e ┆ N The_Array.┆
0x3: 0000 00 00 00 09 80 06 2e 50 75 74 5f 4c 06 50 6f 73 ┆ .Put_L Pos┆