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

⟦a0bb9c4d9⟧ TextFile

    Length: 2358 (0x936)
    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;
with String_Utilities;

package body Field_Parser is

    package Su renames String_Utilities;

    function Delete_Escape (S : in String) return String is
        P : Integer := Su.Locate (Escape, S);
    begin
        if P in 1 .. S'Last - 1 then
            return S (S'First .. P - 1) & S (P + 1) &
                      Delete_Escape (S (P + 2 .. S'Last));
        else
            return S;
        end if;
    end Delete_Escape;


    procedure Open (Parameter : in String; Pos : out Integer) is
    begin
        -- Parameter := Delete_Escape (Parameter);
        Pos := Parameter'First;
    end Open;


    procedure Value (Parameter : in String;
                     Pos : in out Integer;
                     The_Value : out String;
                     Last : out Natural) is
        Field : String (1 .. Parameter'Length) := (others => ' ');
        Pos_Field : Integer := 1;
        At_End : Boolean := False;
    begin
        while not At_End and then Parameter (Pos) /= Separator loop
            if Parameter (Pos) = Escape then
                if not Done (Parameter, Pos) then
                    Pos := Pos + 1;
                end if;
            end if;
            Field (Pos_Field) := Parameter (Pos);
            if not Done (Parameter, Pos) then
                Pos := Pos + 1;
                Pos_Field := Pos_Field + 1;
            else
                At_End := True;
            end if;
        end loop;

        if Pos_Field - 1 = 0 then
            The_Value (1 .. 1) := " ";
            Last := 0;
        else
            if Done (Parameter, Pos) then
                The_Value (1 .. Pos_Field) := Field (1 .. Pos_Field);
                Last := Pos_Field;
            else
                The_Value (1 .. Pos_Field - 1) := Field (1 .. Pos_Field - 1);
                Last := Pos_Field - 1;
            end if;
        end if;
    end Value;


    procedure Next (Parameter : in String; Pos : in out Integer) is
    begin
        if not Done (Parameter, Pos) then
            Pos := Pos + 1;
        end if;
    end Next;


    function Done (Parameter : in String; Pos : in Integer) return Boolean is
    begin
        return Pos = Parameter'Last;
    end Done;


    function Is_Empty_Field (Last : in Natural) return Boolean is
    begin
        return Last = 0;
    end Is_Empty_Field;

end Field_Parser;