delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/06/00:21:04

Message-ID: <3489EA33.3AD2@cs.com>
Date: Sun, 07 Dec 1997 00:13:40 +0000
From: "John M. Aldrich" <fighteer AT cs DOT com>
Reply-To: fighteer AT cs DOT com
Organization: Two pounds of chaos and a pinch of salt
MIME-Version: 1.0
To: Nate Eldredge <eldredge AT ap DOT net>
CC: djgpp AT delorie DOT com
Subject: Re: keyboard problem!
References: <199712060457 DOT UAA07823 AT adit DOT ap DOT net>

Nate Eldredge wrote:
> 
> Actually, he's right: the effect of that code is to read one character from
> DOS standard input. This may be a problem, since on other compilers (at
> least Turbo C) `getch' reads directly from the keyboard. Ideas, anyone?

Oops, never mind.  You're right.  getch() is even documented as doing so
in libc.inf.  I was under the (mistaken) impression that getch()
bypassed DOS file streams.  I suppose getkey() (q.v.) would be the
correct function to use in such cases.

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |     mailto:fighteer AT cs DOT com     |
|    *  Proud user of DJGPP!  *    |   http://www.cs.com/fighteer   |
|    ObJoke:  If Bill Gates were a robber, not only would he        |
|     shoot you, but he'd send you a bill for the bullets.          |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019