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

⟦2881e8188⟧ TextFile

    Length: 2054 (0x806)
    Types: TextFile
    Names: »B«

Derivation

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

TextFile

with Text_Io;
package body File is

    Lookahead : Boolean;
    Current_Char : Character;
    The_File : Text_Io.File_Type;
    Include_File : Text_Io.File_Type;
    Read : Text_Io.File_Mode := Text_Io.In_File;

    function Is_Include_Open return Boolean is
    begin
        return Text_Io.Is_Open (Include_File);
    end Is_Include_Open;

    procedure Open (Fichier_Name : String) is
    begin
        Lookahead := False;  
        if Text_Io.Is_Open (The_File) then
            Text_Io.Open (File => Include_File,
                          Mode => Read,
                          Name => Fichier_Name,
                          Form => "");
            Text_Io.Set_Input (Include_File);
        else
            Text_Io.Open (File => The_File,
                          Mode => Read,
                          Name => Fichier_Name,
                          Form => "");
            Text_Io.Set_Input (The_File);
        end if;
    end Open;

    procedure Close is
    begin
        if Is_Include_Open then
            Text_Io.Close (File => Include_File);
            Text_Io.Set_Input (The_File);
        else
            Text_Io.Close (File => The_File);
        end if;
    end Close;

    function End_Of_Line return Boolean is
    begin
        return Text_Io.End_Of_Line;
    end End_Of_Line;

    function At_End return Boolean is
    begin
        if Lookahead then
            return False;
        else
            return Text_Io.End_Of_File;
        end if;
    end At_End;

    procedure Next is
    begin
        if (Lookahead) then
            Lookahead := False;
        elsif End_Of_Line then
            Text_Io.Skip_Line;
            Current_Char := Ascii.Cr;
        else
            Text_Io.Get (Current_Char);
        end if;
    end Next;

    function Value return Character is
    begin
        return Current_Char;
    end Value;

    function Get return Character is
    begin
        Next;
        return Value;
    end Get;

    procedure Unget is
    begin
        Lookahead := True;
    end Unget;







end File;