From: EJP on
Sorry ignore previous posted in error.
From: Lew on
Lew wrote:
>> The operands in the expression
>>
>> a + b * c / f
>>
>> are evaluated left to right.

EJP wrote:
> There's nothing in the JLS that actually says that. It says in effect
> the operands *of an operator* are evaluated left-to-right.

Of course it says that, in the quote I cited upthread (s. 15.7.1):
"The left-hand operand of a binary operator appears to be fully evaluated
before any part of the right-hand operand is evaluated."

'a' appears to be fully evaluated before '(b * c / f)'.

'b' before '(c / f)'.

'c' before 'f'.

Hence 'a' before 'b' before 'c' before 'f'.

--
Lew
From: EJP on
Sorry, agreed. I was recently dealing with a claim that all operands are
evaluated left to right before any operators, and I'm still touchy about
it ;-)
First  |  Prev  | 
Pages: 1 2 3
Prev: Business Calendar
Next: Reading from very large file