Thread overview
public imports
Mar 04, 2007
Thorsten Kiefer
Mar 04, 2007
Max Samukha
Mar 04, 2007
Frits van Bommel
March 04, 2007
Hi,
is it possible that if I import a module,then I import that module's imports also ?
E.g.:

// test.d
module test;
import std.stdio;

//main.d
import test;
...writefln...


March 04, 2007
On Sun, 04 Mar 2007 16:10:55 -0500, Thorsten Kiefer <thorstenkiefer@gmx.de> wrote:

>Hi,
>is it possible that if I import a module,then I import that module's imports also ?
>E.g.:
>
>// test.d
>module test;
>import std.stdio;
>
>//main.d
>import test;
>...writefln...
>


// test.d
module test;
public import std.stdio;

//main.d
import test;
...writefln...
March 04, 2007
Thorsten Kiefer wrote:
> Hi,
> is it possible that if I import a module,then I import that module's imports also ?
> E.g.:
> 
> // test.d
> module test;
> import std.stdio;
> 
> //main.d
> import test;
> ...writefln...

Ahem.. it's practically in the subject line: "public import std.stdio;" :)
March 04, 2007
Frits van Bommel wrote:

>> is it possible that if I import a module,then I import that module's imports also ?
> 
> Ahem.. it's practically in the subject line: "public import std.stdio;" :)

Also if you find/read old D code, be aware that the default option
for imports changed from "public" over to "private" with DMD 0.163...

http://www.digitalmars.com/d/changelog2.html#new0163

--anders