http://qs321.pair.com?node_id=449134


in reply to Better expression for $x = !!$y||0

One way.

$y?$x=0:$y=1;

update:$x=$y?0:1 is correct as ambs mentioned.

Prasad

Replies are listed 'Best First'.
Re^2: Better expression for $x = !!$y||0
by ambs (Pilgrim) on Apr 19, 2005 at 08:18 UTC
    Not properly this (typo?). The other reply is correct ($x=$y?0:1)

    Alberto Simões