Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!rex!uflorida!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.lang.c Subject: Re: how to write () a constant? Message-ID: <21728@mimsy.umd.edu> Date: 10 Jan 90 08:08:45 GMT References: <10883@attctc.Dallas.TX.US> <21689@mimsy.umd.edu> <241@heel.ribs.UUCP> Distribution: na Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 14 >In article <21689@mimsy.umd.edu> I wrote: >> if (fwrite((void *)&val, sizeof(val), 1, stream)) != sizeof(val)) >> ... handle error ... In article <241@heel.ribs.UUCP> reznick@ribs.UUCP (Larry Reznick) writes: >The comparison is mistaken. The fread() and fwrite() functions return >their 3rd parameters if there's no error. Oops! Quite right. Sorry about that. (See, you *can* find mistakes in my articles occasionally. :-) ) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris