import strangeness with std.stdio.write
rikki cattermole
rikki at cattermole.co.nz
Tue Feb 13 13:52:37 UTC 2018
On 13/02/2018 1:46 PM, psychoticRabbit wrote:
> So, strange problem below.
>
> The commented-out line will not compile (if I un-comment it), unless I
> either move std.stdio into main, or, move std.file out of main.
>
> Whereas writeln works just fine as is.
>
> ---------------------
> module test;
>
> import std.stdio;
>
> void main()
> {
> import std.file;
>
> //write("hello");
> writeln("hello again");
> }
> -----------------------
write exists in both, writeln exists only in std.stdio.
Use named imports to pick which write you want.
More information about the Digitalmars-d-learn
mailing list