Mail Archives: djgpp/1999/01/07/00:18:40
From: | David Arnold <darnold AT northcoast DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | RHIDE exits program without asking for input
|
Date: | Wed, 06 Jan 1999 21:11:30 -0800
|
Organization: | College of the Redwoods
|
Lines: | 39
|
Message-ID: | <36944202.4CA9A0F3@northcoast.com>
|
NNTP-Posting-Host: | 208.25.194.2
|
Mime-Version: | 1.0
|
X-Trace: | 915685332 B/00VXNXNC202D019C usenet53.supernews.com
|
X-Complaints-To: | newsabuse AT remarQ DOT com
|
X-Mailer: | Mozilla 4.5 [en] (Win95; I)
|
X-Accept-Language: | en
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I have a little program from K&R:
#include <stdio.h>
int main()
{
int c;
c=getchar();
while (c != EOF){
putchar(c);
c=getchar();
}
return 0;
}
When I run it from within RHIDE 1.4.7, it works fine: A DOS box opens, I
enter some characters, hit Return, and the characters are echoed. Now,
I'm not sure what the EOF character should be, but I am thinking Ctrl+Z.
This works and I am back in the RHIDE editor. But, when I try to run
again with Ctrl+9, the program exits with: Program exit code; 0
(0x0000), before I get any chance to put in any input. No DOS box opens,
nada.
Can anyone explain why this happens? What should I do to get the
expected behavior?
--
David Arnold
College of the Redwoods
Mathematics Department
7351 Tompkins Hill Road
Eureka, CA 95501
(707) 445-6917
http://online.redwoods.cc.ca.us/instruct/darnold/index.htm
- Raw text -