aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBalajiganapathi S <balajiganapathi.s@gmail.com>2017-10-21 03:35:08 +0800
committerChristian Parpart <christian@ethereum.org>2018-08-08 18:05:51 +0800
commit0000bfc604b985c47ab153f4172596b860c7cce8 (patch)
tree8bf5d50847fb78f89ce1cf380f86691257344b33 /docs
parent4dc3335cda18bae7c683227a9795a7cc1de95fd2 (diff)
downloaddexon-solidity-0000bfc604b985c47ab153f4172596b860c7cce8.tar
dexon-solidity-0000bfc604b985c47ab153f4172596b860c7cce8.tar.gz
dexon-solidity-0000bfc604b985c47ab153f4172596b860c7cce8.tar.bz2
dexon-solidity-0000bfc604b985c47ab153f4172596b860c7cce8.tar.lz
dexon-solidity-0000bfc604b985c47ab153f4172596b860c7cce8.tar.xz
dexon-solidity-0000bfc604b985c47ab153f4172596b860c7cce8.tar.zst
dexon-solidity-0000bfc604b985c47ab153f4172596b860c7cce8.zip
Allow underscores in numbers.
Diffstat (limited to 'docs')
-rw-r--r--docs/types.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/types.rst b/docs/types.rst
index fbc83972..84e58fde 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -284,6 +284,9 @@ one side. Examples include ``1.``, ``.1`` and ``1.3``.
Scientific notation is also supported, where the base can have fractions, while the exponent cannot.
Examples include ``2e10``, ``-2e10``, ``2e-10``, ``2.5e1``.
+Underscores can be used to separate digits of a numeric literal to aid readability.
+For example, ``123_000``, ``0x2eff_abde``, ``1_233e34_89`` are all valid. Underscores are only allowed between two digits.
+
Number literal expressions retain arbitrary precision until they are converted to a non-literal type (i.e. by
using them together with a non-literal expression).
This means that computations do not overflow and divisions do not truncate