aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-12-13 23:43:16 +0800
committerchriseth <c@ethdev.com>2016-12-13 23:43:16 +0800
commitf7e219ed91f256ee076b72c47a1168e32a1ef705 (patch)
tree2c3d780af266bf021fd8b12d645108c38cbef670
parent932e7887bde0ac84b86c257d321a48647b024e6d (diff)
downloaddexon-solidity-f7e219ed91f256ee076b72c47a1168e32a1ef705.tar.gz
dexon-solidity-f7e219ed91f256ee076b72c47a1168e32a1ef705.tar.zst
dexon-solidity-f7e219ed91f256ee076b72c47a1168e32a1ef705.zip
Update documentation.
-rw-r--r--docs/types.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/types.rst b/docs/types.rst
index 59b9771b..069a9190 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -51,18 +51,18 @@ Integers
Operators:
* Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>`` (evaluate to ``bool``)
-* Bit operators: ``&``, ``|``, ``^`` (bitwise exclusive or), ``~`` (bitwise negation), ``<<`` (left shift), ``>>`` (right shift)
-* Arithmetic operators: ``+``, ``-``, unary ``-``, unary ``+``, ``*``, ``/``, ``%`` (remainder), ``**`` (exponentiation)
+* Bit operators: ``&``, ``|``, ``^`` (bitwise exclusive or), ``~`` (bitwise negation)
+* Arithmetic operators: ``+``, ``-``, unary ``-``, unary ``+``, ``*``, ``/``, ``%`` (remainder), ``**`` (exponentiation), ``<<`` (left shift), ``>>`` (right shift)
Division always truncates (it just maps to the DIV opcode of the EVM), but it does not truncate if both
operators are :ref:`literals<rational_literals>` (or literal expressions).
-Division by zero and modulus with zero throws an exception.
+Division by zero and modulus with zero throws a runtime exception.
The result of a shift operation is the type of the left operand. The
expression ``x << y`` is equivalent to ``x * 2**y`` and ``x >> y`` is
equivalent to ``x / 2**y``. This means that shifting negative numbers
-sign extends. Shifting by a negative amount throws an exception.
+sign extends. Shifting by a negative amount throws a runtime exception.
.. index:: address, balance, send, call, callcode, delegatecall
@@ -144,9 +144,9 @@ Operators:
* Bit operators: ``&``, ``|``, ``^`` (bitwise exclusive or), ``~`` (bitwise negation), ``<<`` (left shift), ``>>`` (right shift)
* Index access: If ``x`` is of type ``bytesI``, then ``x[k]`` for ``0 <= k < I`` returns the ``k`` th byte (read-only).
-The shifting operator wors with any integer type as right operand (bit will
-return the type of the left operand). Shifting by a negative amount will cause
-a runtime exception.
+The shifting operator works with any integer type as right operand (but will
+return the type of the left operand), which denotes the number of bits to shift by.
+Shifting by a negative amount will cause a runtime exception.
Members: