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

⟦ac42c6faf⟧ TextFile

    Length: 1375 (0x55f)
    Types: TextFile
    Names: »B«

Derivation

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

TextFile

with Bounded_String;
with Text_Io;

package body Trace is

    procedure On is
    begin
        Active := True;
    end On;

    procedure Off is
    begin
        Active := False;
    end Off;

    procedure Display (What : Scanner.Lexeme) is
    begin  
        if Active then
            Text_Io.Put ("lexeme : ");
            Text_Io.Put_Line (Bounded_String.Image (What));
        end if;
    end Display;

    procedure Display (What : Scanner.Token) is
    begin
        if Active then
            Text_Io.Put ("token  : ");
            Text_Io.Put_Line (Scanner.Token'Image (What));
        end if;
    end Display;

    procedure Display (What : Object.Reference) is
    begin
        if Active then
            Text_Io.Put ("object : ");
            Text_Io.Put (Object.Class'Image (Object.Get_Class (What)));
            case Object.Get_Class (What) is
                when Object.Tortue | Object.Stylo | Object.Vide =>
                    Text_Io.Put_Line ("");
                when others =>
                    Text_Io.Put (" no ");
                    Text_Io.Put_Line (Integer'Image (Object.Get_Id (What)));
            end case;
        end if;
    end Display;

    procedure Display (What : String; Always : Boolean := False) is
    begin
        if Active or Always then
            Text_Io.Put_Line (What);
        end if;
    end Display;

end Trace;