Format

  • ++A // pre-increment
  • A++ // post-increment

The pre-increment has the value (A+1) and the effect of adding 1 to A.

The post-increment has the value (A) and has the effect of adding 1 to A.

var/A = 0
world << "A++ = [A++]" // outputs "A++ = 0"
world << "++A = [++A]" // outputs "++A = 2"

See also