delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
From: | "John Hanley" <jdhanley AT telusplanet DOT net> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: program hanging |
Date: | Thu, 12 Aug 2004 16:02:14 -0600 |
Organization: | University of Alberta |
Lines: | 21 |
Message-ID: | <1092348061.601537@proxy2.srv.ualberta.ca> |
References: | <1092258885 DOT 100659 AT proxy2 DOT srv DOT ualberta DOT ca> <7105-Thu12Aug2004064431+0300-eliz AT gnt DOT org> <1092324277 DOT 615039 AT proxy2 DOT srv DOT ualberta DOT ca> <sv9nh0tndcdjgritie7gqkjth48290ftoe AT 4ax DOT com> |
NNTP-Posting-Host: | proxy2.srv.ualberta.ca |
X-Trace: | tabloid.srv.ualberta.ca 1092348061 8683 129.128.5.161 (12 Aug 2004 22:01:01 GMT) |
X-Complaints-To: | abuse AT ualberta DOT ca |
NNTP-Posting-Date: | Thu, 12 Aug 2004 22:01:01 +0000 (UTC) |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.50.4522.1200 |
X-MIMEOLE: | Produced By Microsoft MimeOLE V5.50.4522.1200 |
Cache-Post-Path: | proxy2.srv.ualberta.ca!unknown AT d199-126-23-72 DOT abhsia DOT telus DOT net |
X-Cache: | nntpcache 3.0.1 (see http://www.nntpcache.org/) |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
> > rtn=fscanf(f,"%c",&c); > > What happens if you get an EOF? > You just go ahead and process whatever is in c anyway! I think I misinterpretted this when replying to your post. You are right in that if it's EOF, I am trying to process it and it's not working so well because it's reading in a char and EOF is an int. I tried an fgetc() and that worked just fine. Sorry for the confusion. I didn't exactly understand what you were saying here the first time. Thanks a bunch for the help! I really appreciate it! Best regards, John
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |