why is this invalid b = a += b ?

S

Stef Mientki

hello,

I can assign a value to more than 1 variable (name) in one line:

a = b = 3

So evaluation of this line must start at the right part.

But the following is not allowed:

b = 2
a = b += 1

I would think that if b has a value,
and the formula is evaluated from right to left,
there's nothing wrong with the above formula.

thanks
Stef Mientki
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,124
Latest member
JuniorPell
Top