cond. op. on ='s LHS

Craig Macbride s900387 at minyos.xx.rmit.oz.au
Sat Feb 23 14:39:48 AEST 1991


johnm at cory.Berkeley.EDU (John D. Mitchell) writes:

>In article <4155 at cernvax.cern.ch> burow at cernvax.cern.ch (burkhard burow) writes:
>>I'm wondering if anyone has any comments on using:
>>       *(a==b?&c:&d) = 1;
>>instead of:
>>       if (a==b) c=1;
>>       else      d=1;

>1) Readability, readability, READABILITY!

>2) Why?  It's not any faster.

3) If someone decides to make c and/or d register variables, they have to
decipher and change your cryptic piece of assignment code.

-- 
 _____________________________________________________________________________
| Craig Macbride, s900387 at minyos.xx.rmit.oz.au |  Reality is for people who   |
| Only the equipment belongs to Victoria Uni.  | can't handle science fiction.|
| of Technology (RMIT); The opinions are mine. |______________________________|



More information about the Comp.lang.c mailing list