Thread overview | ||||||
---|---|---|---|---|---|---|
|
March 04, 2007 public imports | ||||
---|---|---|---|---|
| ||||
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 Re: public imports | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thorsten Kiefer | 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 Re: public imports | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thorsten Kiefer | 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 Re: public imports | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frits van Bommel | 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 |
Copyright © 1999-2021 by the D Language Foundation