On Portability

William E. Davidsen Jr davidsen at steinmetz.ge.com
Thu Oct 27 03:50:53 AEST 1988


  Another thing to avoid is use of the triadic operator to return
expressions of differing types for true and false. Some compilers won't,
and some silently do it wrong. I've never seen one that didn't work as
expected when a cast was used.

ie. m += (a < b ? 0x221 : 14.2);
-- 
	bill davidsen		(wedu at ge-crd.arpa)
  {uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.lang.c mailing list