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

⟦17103967f⟧ TextFile

    Length: 10291 (0x2833)
    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 Object;
with Class_Integer;
with Class_String;
with Class_Turtle;
with Class_Pen_Y;
with Easy_Y;
with Message;
with Text_Io;

procedure Essai_Easy_Y (The_Main_Screen : String) is
    A_Pen, A_Turtle, A_Reference, Resultat : Object.Reference;
    An_Unary : Message.Unary;
    A_Binary : Message.Binary;
    A_Keyword : Message.Keyword;
    An_Integer : Object.Reference;
    Chaine : Bounded_String.Variable_String (80);

    Tiny_Talk : Easy_Y.Window_Type;
    Error : Easy_Y.Window_Type;
    Unparse : Easy_Y.Window_Type;
    type Many_Windows is array (Integer range 1 .. 11) of Easy_Y.Window_Type;
    Windows : Many_Windows;

begin  
    A_Pen := Class_Pen_Y.Create;

    for I in 1 .. 11 loop
        Bounded_String.Copy (Chaine, "Another Window");
        Easy_Y.Put_Title (Window => Windows (I), Title => Chaine);
        Easy_Y.Put_Left (Window => Windows (I),
                         Left => Object.Index ((I * 82254) mod 300));
        Easy_Y.Put_Right (Window => Windows (I),
                          Right => Object.Index ((I * 16316) mod 300));
        Easy_Y.Put_Width (Window => Windows (I),
                          Width => Object.Index ((I * 43527) mod 700));
        Easy_Y.Put_Height (Window => Windows (I),
                           Height => Object.Index ((I * 32337) mod 700));
        Easy_Y.Open (Display => The_Main_Screen, Window => Windows (I));
    end loop;


    Bounded_String.Copy (Chaine, "Tiny_talk");
    Easy_Y.Put_Title (Window => Tiny_Talk, Title => Chaine);
    Easy_Y.Open (Display => The_Main_Screen, Window => Tiny_Talk);


    Bounded_String.Copy (Chaine, "Erreur");
    Easy_Y.Put_Title (Window => Error, Title => Chaine);
    Easy_Y.Put_Left (Window => Error, Left => 500);
    Easy_Y.Put_Right (Window => Error, Right => 500);
    Easy_Y.Put_Width (Window => Error, Width => 300);
    Easy_Y.Put_Height (Window => Error, Height => 400);
    Easy_Y.Open (Display => The_Main_Screen, Window => Error);

    Bounded_String.Copy (Chaine, "Va_En_X");
    Message.Put (Chaine, A_Keyword);
    Bounded_String.Copy (Chaine, "Y");
    Message.Put (Chaine, A_Keyword);
    Message.Put (Class_Integer.Create (20), A_Keyword);
    Message.Put (Class_Integer.Create (30), A_Keyword);
    A_Pen := Class_Pen_Y.Send (A_Keyword, A_Pen);

    Easy_Y.Set_Display (Window => Error);


    Bounded_String.Copy (Chaine, "Unparse");
    Easy_Y.Put_Title (Window => Unparse, Title => Chaine);
    Easy_Y.Put_Left (Window => Unparse, Left => 500);
    Easy_Y.Put_Right (Window => Unparse, Right => 50);
    Easy_Y.Put_Width (Window => Unparse, Width => 400);
    Easy_Y.Put_Height (Window => Unparse, Height => 300);
    Easy_Y.Open (Display => The_Main_Screen, Window => Unparse);

    Bounded_String.Copy (Chaine, "Va_En_X");
    Message.Put (Chaine, A_Keyword);
    Bounded_String.Copy (Chaine, "Y");
    Message.Put (Chaine, A_Keyword);
    Message.Put (Class_Integer.Create (20), A_Keyword);
    Message.Put (Class_Integer.Create (30), A_Keyword);
    A_Pen := Class_Pen_Y.Send (A_Keyword, A_Pen);

    Easy_Y.Set_Display (Window => Unparse);

    Easy_Y.Set_Display (Window => Tiny_Talk);

    loop
        case Easy_Y.Next_Event is
            when Easy_Y.Update =>
                A_Turtle := Class_Turtle_Y.Create;
                for J in 1 .. 3 loop

                    Bounded_String.Copy (Chaine, "Angle");
                    Message.Put (Chaine, A_Keyword);
                    Message.Put (Class_Integer.Create (0), A_Keyword);
                    A_Turtle := Class_Turtle_Y.Send (A_Keyword, A_Turtle);

                    Bounded_String.Copy (Chaine, "Leve_Ta_Plume");
                    Message.Put (Chaine, An_Unary);
                    A_Turtle := Class_Turtle_Y.Send (An_Unary, A_Turtle);

                    for I in 10 .. 50 loop

                        Bounded_String.Copy (Chaine, "Leve_Ta_Plume");
                        Message.Put (Chaine, An_Unary);
                        A_Turtle := Class_Turtle_Y.Send (An_Unary, A_Turtle);

                        Bounded_String.Copy (Chaine, "Va_En_X");
                        Message.Put (Chaine, A_Keyword);
                        Bounded_String.Copy (Chaine, "Y");
                        Message.Put (Chaine, A_Keyword);
                        Message.Put (Class_Integer.Create
                                        (Object.Index (J * 100)), A_Keyword);
                        Message.Put (Class_Integer.Create
                                        (Object.Index (J * 100)), A_Keyword);
                        A_Turtle := Class_Turtle_Y.Send (A_Keyword, A_Turtle);

                        Bounded_String.Copy (Chaine, "Baisse_Ta_Plume");
                        Message.Put (Chaine, An_Unary);
                        A_Turtle := Class_Turtle_Y.Send (An_Unary, A_Turtle);

                        Bounded_String.Copy (Chaine, "A_Gauche");
                        Message.Put (Chaine, A_Keyword);
                        Message.Put (Class_Integer.Create (10), A_Keyword);
                        A_Turtle := Class_Turtle_Y.Send (A_Keyword, A_Turtle);

                        Bounded_String.Copy (Chaine, "Avance");
                        Message.Put (Chaine, A_Keyword);
                        Message.Put (Class_Integer.Create (100), A_Keyword);
                        A_Turtle := Class_Turtle_Y.Send (A_Keyword, A_Turtle);


                        Easy_Y.Set_Display (Window => Unparse);

                        Bounded_String.Copy (Chaine, "Va_En_X");
                        Message.Put (Chaine, A_Keyword);
                        Bounded_String.Copy (Chaine, "Y");
                        Message.Put (Chaine, A_Keyword);
                        Message.Put (Class_Integer.Create (20), A_Keyword);
                        Message.Put (Class_Integer.Create (30), A_Keyword);
                        A_Pen := Class_Pen_Y.Send (A_Keyword, A_Pen);

                        Bounded_String.Copy (Chaine, "Ligne_Suivante");
                        Message.Put (Chaine, An_Unary);
                        A_Pen := Class_Pen_Y.Send (An_Unary, A_Pen);

                        Bounded_String.Copy (Chaine, "Ecrit");
                        Message.Put (Chaine, A_Binary);
                        Message.Put (Class_String.Create ("Alors, ca marche !"),
                                     A_Binary);
                        Resultat := Class_Pen_Y.Send (A_Binary, A_Pen);

                        Easy_Y.Set_Display (Window => Tiny_Talk);
                    end loop;

                    Easy_Y.Clear_Window (Window => Tiny_Talk);

                    Easy_Y.Set_Display (Window => Error);

                    Bounded_String.Copy (Chaine, "Ligne_Suivante");
                    Message.Put (Chaine, An_Unary);
                    A_Pen := Class_Pen_Y.Send (An_Unary, A_Pen);

                    Bounded_String.Copy (Chaine, "Ecrit");
                    Message.Put (Chaine, A_Binary);
                    Message.Put (Class_String.Create ("No Error !"), A_Binary);
                    Resultat := Class_Pen_Y.Send (A_Binary, A_Pen);

                    Easy_Y.Set_Display (Window => Tiny_Talk);
                end loop;

            when Easy_Y.Button_Down =>
                Text_Io.Put ("X=" & Integer'Image
                                       (Integer (Easy_Y.Get_X_Mouse)));
                Text_Io.New_Line;
                Text_Io.Put ("Y=" & Integer'Image
                                       (Integer (Easy_Y.Get_Y_Mouse)));
                Text_Io.New_Line;
                Easy_Y.Move_To (Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_X_Mouse) - 5),
                                Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_Y_Mouse) - 5));
                Easy_Y.Line_To (Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_X_Mouse) + 5),
                                Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_Y_Mouse) + 5));

                Easy_Y.Move_To (Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_X_Mouse) - 5),
                                Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_Y_Mouse) + 5));
                Easy_Y.Line_To (Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_X_Mouse) + 5),
                                Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_Y_Mouse) - 5));

            when Easy_Y.Button_Up =>  
                Text_Io.Put ("X=" & Integer'Image
                                       (Integer (Easy_Y.Get_X_Mouse)));
                Text_Io.New_Line;
                Text_Io.Put ("Y=" & Integer'Image
                                       (Integer (Easy_Y.Get_Y_Mouse)));
                Text_Io.New_Line;
                Easy_Y.Move_To (Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_X_Mouse) - 5),
                                Easy_Y.Coordinate (Integer
                                                      (Easy_Y.Get_Y_Mouse)));
                Easy_Y.Line_To (Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_X_Mouse) + 5),
                                Easy_Y.Coordinate (Integer
                                                      (Easy_Y.Get_Y_Mouse)));

                Easy_Y.Move_To (Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_X_Mouse)),
                                Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_Y_Mouse) - 5));
                Easy_Y.Line_To (Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_X_Mouse)),
                                Easy_Y.Coordinate
                                   (Integer (Easy_Y.Get_Y_Mouse) + 5));
            when others =>
                null;
        end case;
    end loop;

    delay (1.0);
    Easy_Y.Close (Window => Error);
    delay (1.0);
    Easy_Y.Close (Window => Tiny_Talk);
    delay (1.0);
    Easy_Y.Close (Window => Unparse);
    delay (1.0);

    for I in 1 .. 11 loop
        Easy_Y.Close (Window => Windows (I));
    end loop;

exception
    when others =>
        Easy_Y.Close (Window => Tiny_Talk);

end Essai_Easy_Y;