From: "David A. Black" Date: 2005-05-12T08:22:46+09:00 Subject: Re: alternatives to ? : contruct Hi -- On Thu, 12 May 2005, Logan Capaldo wrote: > On 5/11/05, John-Mason P. Shackelford wrote: >> As an alternative to: >> >> a = y == z ? b : c >> >> we can say: >> >> a = (b if y == x) || c >> >> Can anyone think of others? > > Heres one way: > > x == y and a = b or c In the case where x != y, that expression will just return c, without assigning it to a. (I learned this the hard way either here or on IRC recently :-) David -- David A. Black dblack@wobblini.net