Merge pull request #13191 from aiman/doc-decimal-literal-trailing-dots

docs: Disallow decimal literals with trailing dots
This commit is contained in:
Hari 2022-06-27 11:08:02 +02:00 committed by GitHub
commit 046423f272
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -448,8 +448,8 @@ Integer literals are formed from a sequence of digits in the range 0-9.
They are interpreted as decimals. For example, ``69`` means sixty nine. They are interpreted as decimals. For example, ``69`` means sixty nine.
Octal literals do not exist in Solidity and leading zeros are invalid. Octal literals do not exist in Solidity and leading zeros are invalid.
Decimal fractional literals are formed by a ``.`` with at least one number on Decimal fractional literals are formed by a ``.`` with at least one number after the decimal point.
one side. Examples include ``1.``, ``.1`` and ``1.3``. Examples include ``.1`` and ``1.3`` (but not ``1.``).
Scientific notation in the form of ``2e10`` is also supported, where the Scientific notation in the form of ``2e10`` is also supported, where the
mantissa can be fractional but the exponent has to be an integer. mantissa can be fractional but the exponent has to be an integer.