Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aiman
Copy link
Contributor

@aiman aiman commented Jun 22, 2022

Currently the documentation suggests that a decimal literal can omit the fractional part [1]:

Decimal fractional literals are formed by a . with at least one number on one side. Examples include 1., .1 and 1.3.

However, commit ac68710 (May 30, 2018) disallowed trailing dots that are not followed by a number [2].

Using decimal literals of the form 1. will actually result in a ParserError and so the docs should not recommend this form.

[1] https://docs.soliditylang.org/en/v0.8.15/types.html#rational-and-integer-literals
[2] ac68710

Currently the documentation suggests that a decimal literal can omit the
fractional part [1]:

> Decimal fractional literals are formed by a `.` with at least one
> number on one side. Examples include `1.`, `.1` and `1.3`.

However, commit ac68710 (May 30, 2018) disallowed trailing dots that are
not followed by a number [2].

Using decimal literals of the form `1.` will actually result in a
`ParserError` and so the docs should no longer recommend this form.

[1] https://docs.soliditylang.org/en/v0.8.15/types.html#rational-and-integer-literals
[2] argotorg@ac68710
Copy link
Contributor

@hrkrshnn hrkrshnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hrkrshnn hrkrshnn merged commit 046423f into argotorg:develop Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants