atk%vanderbilt.csnet@csnet-relay.arpa (Alan T Krantz) (07/08/85)
There has been much debate as to whether the following code is "good" style: if ( (fp=open(...)) != ERR) I don't know if it is good style but I picked it up while programming in BLISS. Initially I used a similar syntax in PASCAL when I would make a procedure boolean and test for success/failure. I believe that the same thing is being done above. It is not so much the value of FP which is of concern but rather if the function call was successful or not and that is why (at least to me) it is much easier to read code such as above rather than breaking the assignment/test into two different statements. Then you are testing a filepointer for an error condition and that seems a bit odd. Changing the subject - I do have a question: While it is obvious that the below expression is ambiguous b[j] = i++ + a[i] wouldn't it be reasonable that the below be well defined by evaluating lvalues before rvalues?? (I realize that this isn't the current case - but what about for the new standard?) a[i] = i++; atk@vanderbilt