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

⟦8a92ac20a⟧ TextFile

    Length: 1794 (0x702)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

package body Standard_String is

    Vide : constant Natural := 0;


    procedure Add_Char (A_String : in out Object; A_Char : Character) is  
        New_Length : Natural;
    begin  
        New_Length := A_String.The_Length + 1;
        A_String.The_Length := New_Length;
        A_String.The_Contents (New_Length) := A_Char;
    end Add_Char;


    procedure Reset (A_String : in out Object) is
    begin
        A_String.The_Length := Vide;
    end Reset;


    function Empty_String return Object is
        Tempo_String : Object;
    begin
        Tempo_String.The_Length := Vide;
        return Tempo_String;
    end Empty_String;


    function Length (A_String : Object) return Natural is
    begin
        return Natural (A_String.The_Length);
    end Length;


    function Get_Contents (A_String : Object) return String is
    begin
        return String (A_String.The_Contents (1 .. A_String.The_Length));
    end Get_Contents;


    procedure Put_Contents (A_String : in out Object; S : String) is  
        The_Length : Integer;
    begin  
        The_Length := S'Length;
        if The_Length > Typic_Size then
            The_Length := Typic_Size;
        end if;
        A_String.The_Contents (1 .. The_Length) := S (1 .. The_Length);
        A_String.The_Length := The_Length;
    end Put_Contents;


    procedure Copy (From : in Object; To : out Object) is  
    begin
        To.The_Contents := From.The_Contents;
        To.The_Length := From.The_Length;
    end Copy;


    function Equal (Left, Right : Object) return Boolean is
    begin  
        return (Left.The_Length = Right.The_Length) and then
                  (Left.The_Contents (1 .. Left.The_Length) =
                   Right.The_Contents (1 .. Right.The_Length));
    end Equal;



end Standard_String;