cond. op. on ='s LHS

Timo Suhonen suhonen at kunto.jyu.fi
Thu Feb 14 18:48:27 AEST 1991


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;


OK. I have one: The if - else -statement is much more readable than the other
one. Have look with a compiler wich one if faster...

--
Timo Suhonen        I am logged in, therefore I am        suhonen at nic.funet.fi
                                                          suhonen at kunto.jyu.fi
   Opinions(?) are mine (if not stolen), NOT those of Univ. of Jyvaskyla.



More information about the Comp.lang.c mailing list