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