This site requires JavaScript, please enable it in your browser!
Greenfoot back
Kartoffelbrot
Kartoffelbrot wrote ...

2013/4/14

+= and -=

Kartoffelbrot Kartoffelbrot

2013/4/14

#
What does that mean?
variableOne += variableTwo;
Does the variable with the lower value get the value of the other varable?
JetLennit JetLennit

2013/4/14

#
it means (in pseudo-code)
variableOne equals variableOne plus variableTwo;
danpost danpost

2013/4/14

#
It means to add or subtract the evaluated expression on the right to the value of the field on the left. Equivalent to:
variableOne = variableOne + variableTwo;
// and
variableOne = variableOne - variableTwo;
JetLennit JetLennit

2013/4/14

#
So basically, what I said.
You need to login to post a reply.