in reply to Re^4: Why is the execution order of subexpressions undefined? (sane?)
in thread Why is the execution order of subexpressions undefined?
Sub expressions are evaluated before the expressions they are a part of. Order of evaluation within a subexpression is in precedence order with ties broken left to right.
In the expression you gave, both ( $y + 1 ) are subexpressions and would be evaluated before the overall expression, left to right. The fact that they are the same subexpression gives rise to the possible optimisation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Why is the execution order of subexpressions undefined? (sane?)
by tye (Sage) on Apr 12, 2005 at 06:24 UTC | |
by BrowserUk (Patriarch) on Apr 12, 2005 at 06:44 UTC | |
by theorbtwo (Prior) on Apr 18, 2005 at 12:33 UTC |