[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Standard IO - function fwrite

From: Marjan Fojkar
Subject: Re: [avr-gcc-list] Standard IO - function fwrite
Date: Wed, 06 Jun 2007 16:55:41 +0200
User-agent: Thunderbird (Windows/20070509)

Has anyone used function fwrite? I think it does not return right
value.  It should return number of objects successfully written but
in my case it returns written character.
Joerg Wunsch wrote:
As your object has a size of 1, both values are the same.  What did
you expect?
I expected that if one byte is successfully written then the function returns 1 if byte is not written then it returns 0. In case of error it returns e.g. EOF. In my case the function "behaves" like function putc (writting one object of size 1). I didn't try to use it with more that one object at once so i can say what it returns in other cases.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]