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

⟦6010e0f4a⟧ TextFile

    Length: 1642 (0x66a)
    Types: TextFile
    Names: »B«

Derivation

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

TextFile

package body Action is

    function Get_From_File (The_File : Text_Io.File_Type)
                           return Action.Object is
        Inter : String (1 .. Length_Action);
        C : Character;
    begin
        for I in 1 .. Length_Action loop
            Text_Io.Get (The_File, C);
            if C = End_Of_Action then
                for J in I .. Length_Action loop
                    Inter (J) := ' ';
                end loop;
                exit;
            end if;
            Inter (I) := C;
        end loop;
        return Convert_To (Inter);
    end Get_From_File;


    function Convert_To (The_String : String) return Action.Object is
        Inter : Action.Object;
    begin
        if The_String'Length >= Length_Action then
            Inter.The_String := The_String
                                   (The_String'First ..
                                       The_String'First + Length_Action - 1);
        else
            Inter.The_String :=
               The_String & (1 .. Length_Action - The_String'Length =>
                                End_Of_Action);
        end if;
        return Inter;
    end Convert_To;


    function Image (The_Action : Action.Object) return String is
    begin
        return The_Action.The_String;
    end Image;


    procedure Set_To_File (The_File : Text_Io.File_Type;
                           The_Action : Action.Object) is
    begin
        Text_Io.Put_Line (The_File, Image (The_Action));
    end Set_To_File;


    procedure Set_To_Screen (The_Action : Action.Object) is
    begin
        Text_Io.Put_Line (Image (The_Action));
    end Set_To_Screen;


end Action;