Bug 17848 – Example of floating point literals in the documentation is invalid

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-09-22T12:45:30Z
Last change time
2017-10-16T09:57:39Z
Keywords
pull, spec
Assigned to
ag0aep6g
Creator
Peter Varo

Comments

Comment #0 by hello — 2017-09-22T12:45:30Z
The documentation about the 'Floating Point Literals' (https://dlang.org/spec/lex.html#floatliteral) is not mentioning any kind of 'd' suffix for float literals, yet in the examples it is showing as both good and bad ones: the good: https://github.com/dlang/dlang.org/blob/master/spec/lex.dd#L918 the bad: https://github.com/dlang/dlang.org/blob/master/spec/lex.dd#L919 So further actions are required: - If the 'd' suffix should be supported, then it needs further explanation and at the same time, the compiler should accept it as valid float literal. (Which I believe is not a valid one, hence currently dmd is complaining about it.) - If the 'd' suffix is as invalid float literal, then it should be removed from the examples.
Comment #1 by ag0aep6g — 2017-09-22T18:08:53Z
Comment #2 by github-bugzilla — 2017-09-22T20:43:38Z
Commits pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/90bce087c1671bec00cf1a2d2d2d6bc84ed3cc4e fix issue 17848 - Example of floating point literals in the documentation is invalid 'd' is not a valid float suffix. It's not in the grammar, and dmd doesn't accept it. https://github.com/dlang/dlang.org/commit/0b2a4a97797c2ec462dfbafa5248e7cc068d0e43 Merge pull request #1897 from aG0aep6G/patch-3 fix issue 17848 - Example of floating point literals in the documenta… merged-on-behalf-of: Steven Schveighoffer <[email protected]>
Comment #3 by github-bugzilla — 2017-10-16T09:57:39Z
Commits pushed to stable at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/90bce087c1671bec00cf1a2d2d2d6bc84ed3cc4e fix issue 17848 - Example of floating point literals in the documentation is invalid https://github.com/dlang/dlang.org/commit/0b2a4a97797c2ec462dfbafa5248e7cc068d0e43 Merge pull request #1897 from aG0aep6G/patch-3