|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 1121 (0x461) Types: TextFile Names: »B«
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04 └─ ⟦d65440be7⟧ »DATA« └─⟦this⟧
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;