A
Andrew Poelstra
I hope you don't actually write code like that.
Of course not. It was, however, one of my more intersting examples.
I hope you don't actually write code like that.
Why both of you are apt to check the argument of fputs and not like
other people to check the return value of printf? Even though the
argument (s, *s) is available, the function call can fail also, right?
I'm sorry if what I say offended one of you.
That's a very irresponsible attitude. Don't you accept responsibilityAndrew said:I rarely care whether or not a printf call succeeded; in general, I
don't pay too much attention to my UI. (I leave those issues for
whiney testers to find).
Ian Collins said:That's a very irresponsible attitude. Don't you accept responsibility
for your own code?
I ensure that it runs correctly. I usually do not ensure that the userThat's a very irresponsible attitude. Don't you accept responsibility
for your own code?
My comment was directed more at the leaving stuff for the testers toKeith said:There's always the question of what to do if printf fails. Printing
an error message doesn't seem like a sensible response. It's
conceivable (but by no means certain) that ignoring the error and
continuing to run is the best response.
Or simply passing the parameters in the wrong order or providing theAndrew said:I ensure that it runs correctly. I usually do not ensure that the user
knows that it runs correctly. Perhaps that is irresponsible.
Of course, I can't think of what I would do if printf was messing up;
a failure to output suggests system problems outside of my control or
diagonoses.
Just as an aside, have you considered that there as at least two waysKeith said:There's always the question of what to do if printf fails. Printing
an error message doesn't seem like a sensible response. It's
conceivable (but by no means certain) that ignoring the error and
continuing to run is the best response.
lovecreatesbeauty said:Thank you. But there are total 8933 lines in gcc manual document in
Debian Linux 3.1.
Your expertise suggestion can just point out the
right selection from among nearly ten thousand lines of information.
Thank CBFalconer for the kind help.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.