comp.lang.ada
 help / color / mirror / Atom feed
* Keyboard input time out routine
@ 1999-11-09  0:00 Ray
  0 siblings, 0 replies; 6+ messages in thread
From: Ray @ 1999-11-09  0:00 UTC (permalink / raw)


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)?

win 98, intel, AdaGIDE.

with Ada.Text_Io, Ada.Integer_Text_IO;

procedure InputDelay is
X: Integer;

begin
X:=1;
select
  delay 5.0;
  Ada.Text_Io.Put_Line("No data entered");
then abort
  Ada.Integer_Text_IO.Get (X);
end select;
Ada.Integer_Text_IO.Put (X);
end InputDelay;
-- 
"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




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-11-11  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
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

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