Re: how to "wait for any key"

From: Derk Gwen (derkgwen_at_HotPOP.com)
Date: 03/07/04


Date: Sun, 07 Mar 2004 16:53:45 -0000

Alexander Malkis <alexloeschediesmalk@line.cs.uni-sb.de> wrote:
# What is the most portable way of "waiting for any key", i.e. the user
# who runs a program from the console should observe the following:

(1) No portable way.
(2) Confuses the hell out of some people. (Where's the ANY key?)
(3) Doesn't invariably work. SHIFT or CTRL, for example, might not send
any codes to the computer. ESC or CTRL-C can break your program.

Just say "Hit enter (or return)" and use fgets. Clear, simple, direct,
portable, and easy enough for nearly everyone.

--
Derk Gwen http://derkgwen.250free.com/html/index.html
I think that's kinda of personal; I don't think I should answer that.


Relevant Pages

  • Re: How to detect when a console child process is waiting for input?
    ... the console child process is waiting for input, so that I can give them ... WaitForInputIdlefunction which will always return true with a console ... Create a named event to check in your monitoring program. ... you'll need to redirect that call ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Cant send a fax
    ... I can hear the fax noises from the ... But it seems as though the fax console dosen't reply. ... beeps like a call waiting beep. ... I know it's not call waiting because I don't ...
    (microsoft.public.windowsxp.help_and_support)
  • RE: 2.6.9: serial_core: uart_open
    ... Thanks for the suggestion of setting the modem termio to a copy of the xterm ... unresponsive at the console and to telnet sessions. ... Note that this test is being done through an xterm session. ... clear the local flag, then open, waiting for modem control. ...
    (Linux-Kernel)
  • Re: How to detect when a console child process is waiting for input?
    ... >>>the console child process is waiting for input, so that I can give them ... >> When a console is waiting for input, it is generally in ReadConsoleW() ... you'll need to redirect that call ...
    (microsoft.public.win32.programmer.kernel)
  • Re: how to "wait for any key"
    ... Alexander Malkis wrote: ... > who runs a program from the console should observe the following: ... > - the program stops running ...
    (comp.lang.c)