[net.lang.c] Assignments in conditionals

geacc022%timevx@CIT-HAMLET.ARPA (07/15/85)

    There  is  one  place where the "if ((fp = fopen()) == NULL)"
syntax	is  very  useful, and that is in a series of "else if"'s.
If  you  can  keep  your else if's lined up, the code looks a lot
neater (and is generally easier to read).  to wit:

    if (something) {
	...
    }
    else if ((fp = fopen()) == NULL) {
	...
    }
    else if ((fp2 = fopen()) == NULL) {
	...
    }

    Try  writing  the  equivalent  code  without  assignments  in
conditionals,  and you'll see what I mean.  Once you have written
a  few	programs like this, this form becomes at least as easy to
read as two separated statements.

			    Gary Ansok
			    geacc022%timevx @ cit-hamlet.arpa
				(for the moment, anyway)