www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/09/10:26:13

From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Error or question.
Date: Sun, 09 Feb 1997 01:16:17 GMT
Organization: Oxford University
Lines: 14
Message-ID: <32fd22eb.29598800@news.ox.ac.uk>
References: <19970208 DOT 172357 DOT 7999 DOT 1 DOT ethan DOT jacobs AT juno DOT com>
NNTP-Posting-Host: mc31.merton.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sat, 8 Feb 1997 22:31:40 GMT, ethan DOT jacobs AT juno DOT com (Ethan L
Jacobs) wrote:

>	I have a book that says fscanf is supposed to return EOF. In
>DJGPP it returns NULL. Is that an error or is it supposed to be there?

I'm not sure what you're referring to here... fscanf returns the
number of items successfully scanned (quote from libc docs) or, which
isn't stated, EOF if it reaches the end of the file. 

Note that here NULL==0, so if it returns 0 meaning no items scanned
you could be reading this as a NULL.

George Foot

- Raw text -


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