X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Derek" Newsgroups: comp.os.msdos.djgpp Subject: character input question Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Wed, 12 Dec 2001 07:43:53 -0600 NNTP-Posting-Host: 216.161.131.191 X-Trace: news.uswest.net 1008164650 216.161.131.191 (Wed, 12 Dec 2001 07:44:10 CST) NNTP-Posting-Date: Wed, 12 Dec 2001 07:44:10 CST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Is there a way to continue executing a loop UNLESS a key has been pressed during the execution of the loop? My problem is that I cannot have a prompt, because the loop has to continue executing if no character has been pressed. I think what I need to know is is it possible to get a character into the input stream from the keyboard without a prompt? If this is not possible, is there any alternative? I have a countdown timer that I need to reset if 'x' has been pressed. The loop continuously executes and if the number of ticks has gone above the number of ticks in one second, then 1 is subtracted from the currently displayed number and this new number is displayed. I was thinking each iteration I could check to see whether an 'x' has been entered, but I cannot have a prompt. Thanks, Derek