Update docs on assignment operator (#6373)

This commit is contained in:
superfunc 2017-09-15 12:49:00 -07:00 • committed by Andreas Rumpf
commit 248caaf27e
2 changed files with 3 additions and 5 deletions

View file

@ -570,8 +570,7 @@ order. The *names* of the fields also have to be identical.
The assignment operator for tuples copies each component. The assignment operator for tuples copies each component.
The default assignment operator for objects copies each component. Overloading The default assignment operator for objects copies each component. Overloading
of the assignment operator for objects is not possible, but this will change of the assignment operator is described in `type-bound-operations-operator`_.
in future versions of the compiler.
.. code-block:: nim .. code-block:: nim

View file

@ -185,9 +185,8 @@ to a storage location:
var x = "abc" # introduces a new variable `x` and assigns a value to it var x = "abc" # introduces a new variable `x` and assigns a value to it
x = "xyz" # assigns a new value to `x` x = "xyz" # assigns a new value to `x`
``=`` is the *assignment operator*. The assignment operator cannot be ``=`` is the *assignment operator*. The assignment operator can be
overloaded, overwritten or forbidden, but this might change in a future version overloaded. You can declare multiple variables with a single assignment
of Nim. You can declare multiple variables with a single assignment
statement and all the variables will have the same value: statement and all the variables will have the same value:
.. code-block:: .. code-block::