On 05/12/2005 04:52 AM, David A. Black wrote:
> Hi --
> 
> On Thu, 12 May 2005, Logan Capaldo wrote:
> 
>> On 5/11/05, John-Mason P. Shackelford <jpshack / gmail.com> 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 :-)

a = x == y and b or c

-- 
Dr Balwinder Singh Dheeman            Registered Linux User: #229709
CLLO (Chief Linux Learning Officer)   Machines: #168573, 170593, 259192
Anu's Linux@HOME                      Distros: Ubuntu, Fedora, Knoppix
More: http://anu.homelinux.net/~bsd/  Visit: http://counter.li.org/