# ++ operator

Source: https://ref.dm-lang.org/operator/plusplus

### 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.

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

### See also
- [+ operator](https://ref.dm-lang.org/operator/plus.md)
- [+= operator](https://ref.dm-lang.org/operator/plusequals.md)
- [-- operator](https://ref.dm-lang.org/operator/minusminus.md)
- [operators](https://ref.dm-lang.org/operator/index.md)
