From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,345fce79e8dbda9d X-Google-Attributes: gid103376,public From: "Matthew Heaney" Subject: Re: Keyboard input time out routine Date: 1999/11/11 Message-ID: <382ac169_3@news1.prserv.net>#1/1 X-Deja-AN: 547311957 Content-transfer-encoding: 7bit References: <11FADB0F359D6AC2.1F52588FCDAC2F80.5B1126BE5AE8CD31@lp.airnews. net> Content-Type: text/plain; charset="US-ASCII" X-Complaints-To: abuse@prserv.net X-Trace: 11 Nov 1999 13:15:21 GMT, 129.37.62.236 Organization: Global Network Services - Remote Access Mail & News Services Mime-version: 1.0 Newsgroups: comp.lang.ada Date: 1999-11-11T00:00:00+00:00 List-Id: In article <11FADB0F359D6AC2.1F52588FCDAC2F80.5B1126BE5AE8CD31@lp.airnews.net> , Ray 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 else Put_Line ("No data entered."); end if; end; -- Science is, foremost, a method of interrogating reality: proposing hypotheses that seem true and then testing them -- trying, almost perversely, to negate them, elevating only the handful that survive to the status of a theory. Creationism is a doctrine, whose adherents are interested only in seeking out data that support it. George Johnson, NY Times, 15 Aug 1999