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

⟦47405ac04⟧ TextFile

    Length: 2601 (0xa29)
    Types: TextFile
    Names: »B«

Derivation

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

TextFile

with Text_Io;  
with Window_Io;

package body Moteur is

    procedure At_Work is
        Running : Boolean := False;
        Done : Boolean := False;

        task Envoi_Message is
            entry Debut;
            entry Stop;
            entry Pause;
            entry Jouer;
        end Envoi_Message;

        task Espion is
        end Espion;

        task body Espion is  
            Term : Window_Io.Raw.Stream_Type;
            Item : Window_Io.Raw.Key;
            Console : Window_Io.File_Type;

            The_Char : Character := ' ';

        begin
            Window_Io.Raw.Open (Term);
            while The_Char /= 's' loop
                Window_Io.Raw.Get (Term, Item);
                Window_Io.Bell (Console);
                The_Char := Character (Window_Io.Raw.Convert (Item));
                Text_Io.Put_Line (Character'Image (The_Char));
                case The_Char is
                    when 'd' =>
                        Envoi_Message.Debut;  
                    when 's' =>
                        Text_Io.Put_Line (" fin...");
                        Envoi_Message.Stop;
                    when 'j' =>
                        Envoi_Message.Jouer;
                    when 'p' =>
                        Envoi_Message.Pause;

                    when others =>
                        Text_Io.Put_Line ("Erreur de frappe");
                end case;
            end loop;
            Window_Io.Raw.Disconnect (Term);
        end Espion;


        task body Envoi_Message is  
        begin
            while not Done loop
                select
                    accept Debut do
                        Text_Io.Put_Line ("Le debut est annonce");
                        Running := False;
                    end Debut;
                or  
                    accept Jouer do  
                        Running := True;
                        Text_Io.Put_Line ("jouer...");
                    end Jouer;

                or  
                    accept Pause do  
                        Running := False;
                        Text_Io.Put_Line ("pause...");
                    end Pause;  
                or
                    accept Stop do
                        Done := True;  
                        Running := False;
                    end Stop;
                end select;
            end loop;
        end Envoi_Message;


    begin
        while not Done loop
            while Running loop
                Text_Io.Put_Line ("germain muller");
                delay 0.5;
            end loop;
        end loop;
    end At_Work;



end Moteur;