delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/09/03:19:15

Date: Mon, 9 Nov 1998 10:19:09 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Nate Eldredge <nate AT cartsys DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: scanf/gets bug?
In-Reply-To: <36466CB2.A63AC266@cartsys.com>
Message-ID: <Pine.SUN.3.91.981109101851.18112G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Sun, 8 Nov 1998, Nate Eldredge wrote:

> `getch' does what you expect since it (if I recall correctly) reads
> directly from the console instead of going through stdio streams.

A minor nitpicking: ``directly from console'' might mislead someone to
think that it reads from the console device.  This isn't true: `getch'
actually reads from file handle 0 (standard input) and thus can be
redirected to read from a file.

It *is* true that `getch' bypasses the stdio buffering machinery.

- Raw text -


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