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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: Ray Subject: Re: Keyboard input time out routine Date: 1999/11/11 Message-ID: #1/1 X-Deja-AN: 547500801 Content-Transfer-Encoding: 7bit References: <11FADB0F359D6AC2.1F52588FCDAC2F80.5B1126BE5AE8CD31@lp.airnews. net> <382ac169_3@news1.prserv.net> X-Orig-Message-ID: <382B3EF9.398CE328@airmail7.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii NNTP-Posting-Time: Thu Nov 11 16:09:45 1999 Organization: Airnews.net! at Internet America NNTP-Proxy-Relay: library2.airnews.net Mime-Version: 1.0 Reply-To: crwhite12@airmail7.net Abuse-Reports-To: abuse at airmail.net to report improper postings Newsgroups: comp.lang.ada Date: 1999-11-11T00:00:00+00:00 List-Id: 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 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; -- "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