From: Preben Randhol <randhol+valid_for_reply_from_news@pvv.org>
Subject: Re: Keyboard Polling Solution
Date: Wed, 18 Feb 2004 23:10:54 +0000 (UTC)
Date: 2004-02-18T23:10:54+00:00 [thread overview]
Message-ID: <slrnc37s7u.10d.randhol+valid_for_reply_from_news@k-083152.nt.ntnu.no> (raw)
In-Reply-To: 4033DB01.2CE34E32@me.org
On 2004-02-18, Me <me@me.org> wrote:
> Yes, "Get_Immediate" seems to do the trick. Thanks for the tip.
>
> Test Example :
>
>
>
>
> with Text_IO; use Text_IO;
>
> procedure Test is
>
> My_Char : CHARACTER := ' ';
> Character_Exists : BOOLEAN := FALSE;
> Loop_Counter : INTEGER := 0;
>
> procedure Take_A_Break is begin put_line ("Taking a break from
> polling..."); end Take_A_Break;
>
> begin
>
> loop
> Loop_Counter := Loop_Counter + 1;
> for X in 1..10000 loop
> Get_Immediate (Item => My_Char,
> Available => Character_Exists);
> if (Character_Exists) then
> put_line ("Character entered. Done.");
> return;
> end if;
> end loop;
> Take_A_Break;
> end loop;
>
> end;
>
>
Hmm, to me this looks like you want to read about tasks in Ada.
--
"Saving keystrokes is the job of the text editor, not the programming
language."
next prev parent reply other threads:[~2004-02-18 23:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-18 21:37 Keyboard Polling Solution Me
2004-02-18 23:10 ` Preben Randhol [this message]
2004-02-19 0:30 ` Bruce or Tracy Jacobs
2004-02-19 11:47 ` Marin David Condic
2004-02-19 22:57 ` Bruce or Tracy Jacobs
2004-02-20 12:15 ` Marin David Condic
2004-02-20 20:59 ` Chad R. Meiners
2004-02-22 21:26 ` Bruce or Tracy Jacobs
2004-02-23 10:40 ` Preben Randhol
2004-02-25 0:44 ` Bruce or Tracy Jacobs
2004-02-25 2:05 ` Chad R. Meiners
2004-03-03 16:20 ` Me
2004-02-20 21:38 ` Warren W. Gay VE3WWG
2004-02-22 21:30 ` Bruce or Tracy Jacobs
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox