cond. op. on ='s LHS

Kevin D. Quitt kdq at demott.com
Thu Feb 14 09:22:00 AEST 1991


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;

    It's cryptic and ugly, therefore harder to maintain.  It also produces
identical code (gcc, MSC 6.0).  It *does* save several bytes of storage.



-- 
 _
Kevin D. Quitt         demott!kdq   kdq at demott.com
DeMott Electronics Co. 14707 Keswick St.   Van Nuys, CA 91405-1266
VOICE (818) 988-4975   FAX (818) 997-1190  MODEM (818) 997-4496 PEP last



More information about the Comp.lang.c mailing list