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

⟦09ea41eb6⟧ TextFile

    Length: 1121 (0x461)
    Types: TextFile
    Names: »B«

Derivation

└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Text_Io;
package body String_Utile is
    use Text_Io;

-- procedure Free_Mem is new Unchecked_Deallocation (String, pString);

    Val_Init : constant String := "";
    P : Pstring := new String'(Val_Init);
    Old_P : Pstring;
    X : Natural := 0;

    function Readstring (Max_Size : Natural) return String is
        C : Character;

    begin
        if End_Of_Line or Max_Size = 0 then
            Skip_Line;
            return "";
        else
            Get (C);
            return C & Readstring (Max_Size - 1);
        end if;
    end Readstring;

    procedure Initstring is
    begin
        X := 0;
        P := new String'(Val_Init);
    end Initstring;

    procedure Buildstring (Car : Character) is
    begin
        X := X + 1;
        Old_P := P;
        P := new String (1 .. X);
        P (1 .. X - 1) := Old_P.all;
        P (X) := Car;
--   Free_Mem (old_p);
    end Buildstring;

    function Givestring return Pstring is
        Y : Natural;
    begin
        Old_P := new String (1 .. X);
        Old_P := P;
        Initstring;
        return Old_P;
    end Givestring;

end String_Utile;