cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/06/03:09:21

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: EOF
Date: Wed, 05 Feb 1997 20:28:49 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 17
Message-ID: <32F95E01.6609@cs.com>
References: <32F9042D DOT 145D AT exis DOT net>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp103.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Joe Wright wrote:
> 
> What key do I press to have getchar() return EOF?  I have tried
> everything I can think of, ^D, ^Z, ^X.  Nothing seems to do it.  I get
> out of the thing with ^C which is an error, of course.

AFAIK, under DOS the EOF character has no special significance when read
from a tty device such as stdin.  All you will get is the ASCII code for
^Z.  The only way that getchar() could ever return EOF is if stdin were
redirected to a file or pipe.

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I |        fighteer AT cs DOT com          |
| Proud owner of what might one   |   http://www.cs.com/fighteer    |
| day be a spectacular MUD...     | Plan: To make Bill Gates suffer |
---------------------------------------------------------------------

- Raw text -


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