On Tue, 31 May 2005 03:49:09 GMT, Dave Thompson
<da************ *@worldnet.att. net> wrote:
On Thu, 19 May 2005 13:56:37 GMT, Thomas Matthews
<Th************ *************@s bcglobal.net> wrote:
<snip> All depends on your style and error handling.
My preference is:
unsigned char successful = 0;
fp = fopen(...);
successful = fp == NULL;
Shirley <G> you mean fp != NULL .
I always put parentheses round conditions in assignments, it's too easy
to read (and type and not notice) it as
successful = fp = NULL;
but putting
successful = (fp == NULL);
makes the condition more obvious, and thus the logical error you point
out stands out more as well.
cHris C