aboutsummaryrefslogtreecommitdiffstats
path: root/docs/types.rst
diff options
context:
space:
mode:
authorChristian Parpart <christian@parpart.family>2018-08-03 22:13:52 +0800
committerChristian Parpart <christian@ethereum.org>2018-08-08 19:38:46 +0800
commitb9222808f61e00833f8c11cd196cafb50ec9e1b9 (patch)
tree93f7552a8effdb5e3ab3a240f4337edd3f8f249c /docs/types.rst
parent09a36cba0223c16248335703412cee019c7aa59f (diff)
downloaddexon-solidity-b9222808f61e00833f8c11cd196cafb50ec9e1b9.tar
dexon-solidity-b9222808f61e00833f8c11cd196cafb50ec9e1b9.tar.gz
dexon-solidity-b9222808f61e00833f8c11cd196cafb50ec9e1b9.tar.bz2
dexon-solidity-b9222808f61e00833f8c11cd196cafb50ec9e1b9.tar.lz
dexon-solidity-b9222808f61e00833f8c11cd196cafb50ec9e1b9.tar.xz
dexon-solidity-b9222808f61e00833f8c11cd196cafb50ec9e1b9.tar.zst
dexon-solidity-b9222808f61e00833f8c11cd196cafb50ec9e1b9.zip
Cleanup & polish numbers-with-underscores parsing, also improving tests.
Diffstat (limited to 'docs/types.rst')
-rw-r--r--docs/types.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/types.rst b/docs/types.rst
index 4bade37c..5c4a30ca 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -285,7 +285,9 @@ Scientific notation is also supported, where the base can have fractions, while
Examples include ``2e10``, ``-2e10``, ``2e-10``, ``2.5e1``.
Underscores can be used to separate the digits of a numeric literal to aid readability.
-For example, ``123_000``, ``0x2eff_abde``, ``1233_e348_9a`` are all valid. Underscores are only allowed between two digits. For hex literals, underscores are only allowed to separate groups of 4 hex digits.
+For example, decimal ``123_000``, hexadecimal ``0x2eff_abde``, scientific decimal notation ``1_2e345_678`` are all valid.
+Underscores are only allowed between two digits and only one consecutive underscore is allowed.
+There is no additional semantic meaning added to a number literal containing underscores.
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).