Do chained comparisons short-circuit?

2006-01-18 Thread Joe Gottman
Suppose I have code that looks like this: my ($x, $y, $z) = (1, 2, 3); say sorted backward if ++$x ++$y ++$z; Will $z be incremented even though the chained comparison is known to be false after ++$x and ++$y are compared? Joe Gottman

Re: Do chained comparisons short-circuit?

2006-01-18 Thread Luke Palmer
On 1/19/06, Joe Gottman [EMAIL PROTECTED] wrote: Suppose I have code that looks like this: my ($x, $y, $z) = (1, 2, 3); say sorted backward if ++$x ++$y ++$z; Will $z be incremented even though the chained comparison is known to be false after ++$x and ++$y

Re: Do chained comparisons short-circuit?

2006-01-18 Thread Ph. Marek
On Thursday 19 January 2006 04:25, Luke Palmer wrote: On 1/19/06, Joe Gottman [EMAIL PROTECTED] wrote: Suppose I have code that looks like this: my ($x, $y, $z) = (1, 2, 3); say sorted backward if ++$x ++$y ++$z; Will $z be incremented even though the