aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-12-01 00:36:02 +0800
committerYoichi Hirai <i@yoichihirai.com>2016-12-01 17:59:42 +0800
commit3e8a017d4227d0f5f31ebecffddb4a0262e4efe0 (patch)
tree28600d154a3712ec3c5d803a8678f7030888ee0f /docs
parentac357d12252ceb113a823a400418a59a94521c71 (diff)
downloaddexon-solidity-3e8a017d4227d0f5f31ebecffddb4a0262e4efe0.tar
dexon-solidity-3e8a017d4227d0f5f31ebecffddb4a0262e4efe0.tar.gz
dexon-solidity-3e8a017d4227d0f5f31ebecffddb4a0262e4efe0.tar.bz2
dexon-solidity-3e8a017d4227d0f5f31ebecffddb4a0262e4efe0.tar.lz
dexon-solidity-3e8a017d4227d0f5f31ebecffddb4a0262e4efe0.tar.xz
dexon-solidity-3e8a017d4227d0f5f31ebecffddb4a0262e4efe0.tar.zst
dexon-solidity-3e8a017d4227d0f5f31ebecffddb4a0262e4efe0.zip
docs: describe the form of number literals
This is a part of #1390
Diffstat (limited to 'docs')
-rw-r--r--docs/types.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/types.rst b/docs/types.rst
index 0436fc70..896910ff 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -169,6 +169,14 @@ Fixed Point Numbers
Rational and Integer Literals
-----------------------------
+Integer literals are formed from a sequence of numbers in the range 0-9.
+They are interpreted as decimals. For example, ``69`` means sixty nine.
+Octal literals do not exist in Solidity and leading zeros are ignored.
+For example, ``0100`` means one hundred.
+
+Decimal literals are formed by a ``.`` with at least one number on
+one side. Examples include ``1.``, ``.1`` and ``1.3``.
+
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