cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/10/23:45:41

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: getchar()
Date: Mon, 10 Aug 1998 20:28:21 -0700
Organization: Alcyone Systems
Lines: 19
Message-ID: <35CFBA55.6E26CCF@alcyone.com>
References: <006a23259010b88PROXY AT sion DOT net>
NNTP-Posting-Host: kamali.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Inkel AT sion DOT com wrote:

> I'm reading K&R and, in the example 1.5 I have to use gecthar(), which
> should return _the pressed character_, and, redirect it to the screen
> with putchar(). Everything works fine except getchar, which only
> returns
> me the _single or multiple character stream_ I'm writing when I press
> <\n>. Why?

It's because stdin is buffered.

-- 
Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900 
Alcyone Systems / irc maxxon (efnet) / finger max AT sade DOT alcyone DOT com
  San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/
          USA / icbm 37 20 07 N 121 53 38 W / &tSftDotIotE
             \
            / But since when can wounded eyes see
           / Joi

- Raw text -


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