[Issue 17848] New: Example of floating point literals in the documentation is invalid

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 22 12:45:30 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17848

          Issue ID: 17848
           Summary: Example of floating point literals in the
                    documentation is invalid
           Product: D
           Version: D2
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dlang.org
          Assignee: nobody at puremagic.com
          Reporter: hello at petervaro.com

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.

--


More information about the Digitalmars-d-bugs mailing list