English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

Increment the preceeding variable by the amount that follows. E.g.,

count += 2;

is the same as

count = count + 2;

2007-02-15 06:28:35 · answer #1 · answered by fifty2weekhi 2 · 2 0

I had a really hard time understanding this myself when I first started programming. It has different meanings for different types. If the variable is any numeric type, then it takes the value stored in the variable and adds the amount on the right and then stores that value back in the original variable. If it is a string, then it concatenates the original string and the string on the right and then stores that string back in the original variable.

2007-02-19 14:23:42 · answer #2 · answered by nerd00 2 · 0 0

fedest.com, questions and answers