Mail Archives: djgpp/1997/07/28/19:18:11
A. Sinan Unur wrote:
> that is at best worthless advice. the documentation in this case is
> plain wrong. it is a small mistake, but fread is supposed to return 0 in
> case of error.
Actually, fread (and fwrite) return the number of elements actually read
(or written) -- an error condition is if this number is less than the
number of elements you passed in. Returning zero means _none_ of the
elements got read (or written), but there are more failure cases than just
that.
--
Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
Alcyone Systems / web / http://www.alcyone.com/max/
San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W
\
"Love is not love which alters / when it alternation finds."
/ William Shakespeare, _Sonnets_, 116
- Raw text -