Mail Archives: djgpp/1997/02/06/03:09:21
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 -