|
|
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: 6144 (0x1800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body String_Run, seg_026569, seg_026d2a
└─⟦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 String_Run is
---------------------------------------------------------------------------
procedure Init (Iter : in out Iterator; With_String : String) is
The_Object : Object (With_String'First, With_String'Last);
begin
Iter.Last := With_String'Last;
Iter.Index := With_String'First;
Iter.The_Object := The_Object;
Iter.The_Object.String := With_String;
exception
when Constraint_Error =>
Text_Io.Put_Line ("-- Init Error");
raise;
end Init;
---------------------------------------------------------------------------
function Next_Done (Iter : Iterator) return Boolean is
begin
return (Iter.Index >= Iter.Last);
end Next_Done;
---------------------------------------------------------------------------
function Done (Iter : Iterator) return Boolean is
begin
return (Iter.Index > Iter.Last);
end Done;
---------------------------------------------------------------------------
function Next_Value (Iter : Iterator) return Character is
begin
if (not Next_Done (Iter)) then
return Iter.The_Object.String (Iter.Index + 1);
else
return Ascii.Nul;
end if;
end Next_Value;
---------------------------------------------------------------------------
function Value (Iter : Iterator) return Character is
begin
return Iter.The_Object.String (Iter.Index);
end Value;
---------------------------------------------------------------------------
function Current_Index (Iter : Iterator) return Natural is
begin
return Iter.Index;
end Current_Index;
---------------------------------------------------------------------------
function Cut (Iter : Iterator; Index : Natural) return String is
The_String : String (1 .. Iter.Last - Index + 1);
begin
The_String := Iter.The_Object.String (Index .. Iter.Last);
return The_String;
exception
when Constraint_Error =>
Text_Io.Put_Line ("-- Cut Error");
raise;
end Cut;
---------------------------------------------------------------------------
function Rest (Iter : Iterator) return String is
The_String : String (1 .. Iter.Last - Iter.Index);
begin
The_String := Iter.The_Object.String (Iter.Index + 1 .. Iter.Last);
return The_String;
exception
when Constraint_Error =>
Text_Io.Put_Line ("-- Rest error");
raise;
end Rest;
---------------------------------------------------------------------------
procedure Next (Iter : in out Iterator) is
begin
if (Iter.Index /= Index_Range'Last) then
Iter.Index := Index_Range'Succ (Iter.Index);
end if;
end Next;
---------------------------------------------------------------------------
procedure Previous (Iter : in out Iterator) is
begin
if (Iter.Index /= Iter.The_Object.String'First) then
Iter.Index := Index_Range'Pred (Iter.Index);
end if;
end Previous;
end String_Run;
-------------------------------------------------------------------------------
nblk1=5
nid=0
hdr6=a
[0x00] rec0=1d rec1=00 rec2=01 rec3=08a
[0x01] rec0=00 rec1=00 rec2=04 rec3=014
[0x02] rec0=20 rec1=00 rec2=02 rec3=09e
[0x03] rec0=1e rec1=00 rec2=05 rec3=02a
[0x04] rec0=11 rec1=00 rec2=03 rec3=000
tail 0x21520437a83aa679a34a0 0x42a00088462063c03