Documentation error
Flade
consolemaster0 at gmail.com
Tue Aug 4 15:05:42 UTC 2020
Hi everyone! I'm new to D (this is my first post hele) and I was
just reading the documentation from the beginning and I found an
error. In the part when it's talking about scoped imports, in the
second code snippet, there is an error when it's says:
<< writeln("bar"); // calls std.stdio.writeln >>
(it's 8th line if you paste it in an editor). This is actually
calling the writeln function we have made and not the writeln
function from the std.stdio module. When calling "foo" as it is
in the example it prints nothing to the terminal which is really
odd! Replacing this line with:
<< std.stdio.writeln("bar") >>
and running the program, it normally prints "bar" to the terminal
as expected!
Run it and you'll see!
More information about the Digitalmars-d
mailing list