From: Ray <crwhite12@airmail7.net>
Subject: Re: Keyboard input time out routine
Date: 1999/11/11
Date: 1999-11-11T00:00:00+00:00 [thread overview]
Message-ID: <B94C2AACE5FD49E5.F586390D9ABF88C3.A2C5492FFC18140C@lp.airnews.net> (raw)
In-Reply-To: 382ac169_3@news1.prserv.net
Thanks Matthew, I was able to expand your information to get a working idea of
what to do. Looks like I need to write a procedure (like I did in C++ using
kbhit and getch) to process any keystrokes and build the number, and time out if
the enter key is not hit in the allotted time.
Matthew Heaney wrote:
> Ray <crwhite12@airmail7.net> wrote:
>
> > I am trying to allow a max time for keyboard (math speed test program),
> > but the following code only sort of works. It times out, but waits for
> > an input (unused) before printing out the message. I want the message
> > to print as soon as the time allotted for input has passed. Hints? Is
> > select even the right way to go (pulled the code from the help docs)?
>
> I don't think your ATC example will work. You could try polling the
> input using Get_Immediate:
>
> declare
> C : Character;
> Available : Boolean;
> begin
> for I in 1 .. 50 loop
> Get_Immediate (C, Available);
> exit when Available;
> delay 0.1;
> end loop;
>
> if Available then
> <do whatever>
> else
> Put_Line ("No data entered.");
> end if;
> end;
--
"I'm not lost, I just don't know where I am!"
In the interest of anti-spam, I have added numerics to my email address
Ray
next prev parent reply other threads:[~1999-11-11 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <11FADB0F359D6AC2.1F52588FCDAC2F80.5B1126BE5AE8CD31@lp.airnews. net>
1999-11-11 0:00 ` Keyboard input time out routine Matthew Heaney
1999-11-11 0:00 ` Ray [this message]
1999-11-11 0:00 ` Matthew Heaney
1999-11-11 0:00 ` Ray
1999-11-11 0:00 ` David C. Hoos, Sr.
1999-11-09 0:00 Ray
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox