DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦e3edbb6bd⟧ TextFile

    Length: 3393 (0xd41)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

-------------------------------------------------------------------------------
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;
-------------------------------------------------------------------------------