comp.lang.ada
 help / color / mirror / Atom feed
From: sk <noname@myob.com>
Subject: Re: So long folks (from Robert Dewar)
Date: Tue, 03 Sep 2002 10:07:27 -0500
Date: 2002-09-03T10:07:27-05:00	[thread overview]
Message-ID: <mailman.1031065802.12138.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: 4519e058.0209030627.1d25b49c@posting.google.com

Hi,

-------------------------------------
with CLA_Io;
with Miscellaneous_Support_Functions;
with Random_Number_Generator;

procedure Dewar_Bot is

    package CLAIO       renames CLA_Io;
    package MSF         renames Miscellaneous_Support_Functions;
    package RNG         renames Random_Number_Generator;

    Date     : MSF.Date_Type;
    Ignoring : Boolean := True;

    type Response_Type is new String (1 .. 20);
    
    Responses : constant array (1 .. 7) of Response_Type := (
        1 => "Rubbish             ",
        2 => "Complete Drivel     ",
        3 => "Nonsense            ",
        4 => "Contact ACT support ",
        5 => "Complete Nonsense   ",
        6 => "Absolute Rubbish    ",
        7 => "See the RM,         "
    );

    Chapter, Verse : Natural := 0;

begin
    loop
        MSF.Get_Date (Date);

        exit when Date = "2002.08.31";

        loop
            CLAIO.Get_Message;

            exit when CLAIO.No_New_CLA_Messages;

            Ignoring := RNG.Get_Random_Boolean_Value;

            if not Ignoring then

                 Response_Id := RNG.Get_Random_Natural (
                     First => Responses'First,
                     Last  => Responses'Last
                 );

                 if Response_Id = Responses'Last then

                     Chapter := RNG.Get_Random_Natural (1 .. 1000);
                     Verse   := RNG.Get_Random_Natural (1 .. 1000);

                     CLAIO.Send_Response (
                         Responses(Response_Id) &
                         "Chapter : " & Natural'Image (Chapter) &
                         ", Verse : " & Natural'Image (Verse)
                     );

                 else 

                     CLAIO.Send_Response (Responses(Response_Id));

                 end if;

            end if;

        end loop;

        MSF.Wait_For_An_Hour_Or_So;

    end loop;

end Dewar_Bot;

-------------------------------------
Please take this in the spirit (and silliness) of the
current thread and not a personal comment about Robert
Dewar. He can't be all that bad ! After all, he did invite 
everyone to come and watch a movie on his big-tv once 
after he mistakenly posted a personal e-mail

 o o
  |
 \_/

-- 
-------------------------------------
-- Merge vertically for real address
-------------------------------------
s n p @ t . o
 k i e k c c m
-------------------------------------



  reply	other threads:[~2002-09-03 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-31 22:04 So long folks (from Robert Dewar) Robert Dewar
2002-09-01 16:33 ` Peter Richtmyer
2002-09-02  2:06   ` Warren W. Gay VE3WWG
2002-09-02  6:34     ` Dale Stanbrough
2002-09-02 15:04       ` Ben Brosgol
2002-09-03 14:27       ` Ted Dennison
2002-09-03 15:07         ` sk [this message]
2002-09-03 15:03       ` Wes Groleau
2002-09-04 22:11 ` François Godmé
2002-09-05 13:40   ` Preben Randhol
2002-09-06 22:01 ` Stanley Allen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox