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

⟦558d62273⟧ TextFile

    Length: 2368 (0x940)
    Types: TextFile
    Names: »B«

Derivation

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

TextFile

with Text_Io, Bounded_String, Message;
package body Printer is
    Row_Number : Integer := 0;
    type Last_Write is (Simple_Put, New_Line_Put);
    The_Last_Write : Last_Write := New_Line_Put;

    function "*" (N : Integer; C : Character) return String is
    begin
        return String'(1 .. N => C);
    end "*";

    procedure Justify is
    begin
        Text_Io.Put (Row_Number * ' ');
    end Justify;

    procedure Write (The_String : String) is
    begin  
        if The_Last_Write = New_Line_Put then
            Justify;
            The_Last_Write := Simple_Put;
        end if;
        Text_Io.Put (The_String);
        Text_Io.Put (" ");
    end Write;

    procedure Write (The_Tiny_String : Message.Tiny_String) is
    begin  
        if The_Last_Write = New_Line_Put then
            Justify;
            The_Last_Write := Simple_Put;
        end if;
        Text_Io.Put (Bounded_String.Image (The_Tiny_String));
        Text_Io.Put (" ");
    end Write;

    procedure Write_St (The_String : String) is  
    begin  
        if The_Last_Write = New_Line_Put then
            Justify;
            The_Last_Write := Simple_Put;
        end if;
        Text_Io.Put (The_String);
    end Write_St;

    procedure Write_St (The_Tiny_String : Message.Tiny_String) is
    begin  
        if The_Last_Write = New_Line_Put then
            Justify;
            The_Last_Write := Simple_Put;
        end if;
        Text_Io.Put (Bounded_String.Image (The_Tiny_String));
    end Write_St;

    procedure Write_Ln (The_String : String) is
    begin  
        Text_Io.Put_Line (The_String);
        The_Last_Write := New_Line_Put;
    end Write_Ln;

    procedure Write_Ln (The_Tiny_String : Message.Tiny_String) is
    begin  
        Text_Io.Put_Line (Bounded_String.Image (The_Tiny_String));
        The_Last_Write := New_Line_Put;
    end Write_Ln;

    procedure New_Line is
    begin
        if The_Last_Write /= New_Line_Put then
            Text_Io.Put_Line ("");
            The_Last_Write := New_Line_Put;
        end if;
    end New_Line;

    procedure Forward (Row : Natural) is
    begin
        Row_Number := Row_Number + Row;
    end Forward;

    procedure Backward (Row : Natural) is
    begin
        Row_Number := Row_Number - Row;
        if Row_Number < 0 then
            Row_Number := 0;
        end if;
    end Backward;


end Printer;