# = operator

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

### Format
> `A = B`

Set A equal to B.

Note that this is not the same as the equality test (==), which tests if A is equal to B.

All assignment operators, including calculate-and-assign (such as the += operator), can be chained together, and they are evaluated in right-to-left order. Therefore, a = b += c is a legal statement. It is equivalent to adding b and c, storing the result in b, then setting a to use the new value of b. (a = b) += c will, on the other hand, set a to equal b, then add c to a and store the result in a; b is never changed.

### See also
- [\*= operator](https://ref.dm-lang.org/operator/asteriskequals.md)
- [+= operator](https://ref.dm-lang.org/operator/plusequals.md)
- [-= operator](https://ref.dm-lang.org/operator/minusequals.md)
- [/= operator](https://ref.dm-lang.org/operator/slashequals.md)
- [%= operator](https://ref.dm-lang.org/operator/moduloequals.md)
- [|= operator](https://ref.dm-lang.org/operator/vertequals.md)
- [&= operator](https://ref.dm-lang.org/operator/ampequals.md)
- [^= operator](https://ref.dm-lang.org/operator/caretequals.md)
- [\<\<= operator](https://ref.dm-lang.org/operator/lesslessequals.md)
- [\>\>= operator](https://ref.dm-lang.org/operator/greatergreaterequals.md)
- [:= operator](https://ref.dm-lang.org/operator/colonequals.md)
- [||= operator](https://ref.dm-lang.org/operator/vertvertequals.md)
- [&&= operator](https://ref.dm-lang.org/operator/ampampequals.md)
- [operators](https://ref.dm-lang.org/operator/index.md)
