digitalmars.D - Documentation error
- Flade (14/14) Aug 04 2020 Hi everyone! I'm new to D (this is my first post hele) and I was
- Steven Schveighoffer (3/18) Aug 04 2020 Can you post a link to the page you are referring to?
- Petar Kirov [ZombineDev] (4/8) Aug 04 2020 I think it's this one:
- Petar Kirov [ZombineDev] (4/14) Aug 04 2020 Edit: I meant this one:
- Flade (3/18) Aug 04 2020 Yep exactly! It's this page!
- Steven Schveighoffer (7/9) Aug 04 2020 Ah, yes!
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!
Aug 04 2020
On 8/4/20 11:05 AM, Flade wrote: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!Can you post a link to the page you are referring to? -Steve
Aug 04 2020
On Tuesday, 4 August 2020 at 15:07:58 UTC, Steven Schveighoffer wrote:On 8/4/20 11:05 AM, Flade wrote:I think it's this one: https://dlang.org/spec/module.html#name_lookup[...]Can you post a link to the page you are referring to? -Steve
Aug 04 2020
On Tuesday, 4 August 2020 at 16:28:31 UTC, Petar Kirov [ZombineDev] wrote:On Tuesday, 4 August 2020 at 15:07:58 UTC, Steven Schveighoffer wrote:Edit: I meant this one: https://dlang.org/spec/module.html#scoped_importsOn 8/4/20 11:05 AM, Flade wrote:I think it's this one: https://dlang.org/spec/module.html#name_lookup[...]Can you post a link to the page you are referring to? -Steve
Aug 04 2020
On Tuesday, 4 August 2020 at 16:33:32 UTC, Petar Kirov [ZombineDev] wrote:On Tuesday, 4 August 2020 at 16:28:31 UTC, Petar Kirov [ZombineDev] wrote:Yep exactly! It's this page!On Tuesday, 4 August 2020 at 15:07:58 UTC, Steven Schveighoffer wrote:Edit: I meant this one: https://dlang.org/spec/module.html#scoped_importsOn 8/4/20 11:05 AM, Flade wrote:I think it's this one: https://dlang.org/spec/module.html#name_lookup[...]Can you post a link to the page you are referring to? -Steve
Aug 04 2020
On 8/4/20 12:33 PM, Petar Kirov [ZombineDev] wrote:Edit: I meant this one: https://dlang.org/spec/module.html#scoped_importsAh, yes! imports of symbols never override local symbols unless you use selective/rename import. We'll have to think about how to rewrite the example/docs Thanks! -Steve
Aug 04 2020