From: "John M. Aldrich" 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 | ---------------------------------------------------------------------