modules
Hasan Aljudy
hasan.aljudy at gmail.com
Mon May 1 02:08:28 PDT 2006
Derek Parnell wrote:
> On Mon, 01 May 2006 00:59:01 +1000, James Pelcis <jpelcis at gmail.com> wrote:
>
>> As I understand it, the documentation is referring to the default
>> module name. If you felt like it, you could do something like the
>> following:
>>
>> test1.d
>> module blah;
>>
>> private import std.stdio;
>>
>> void print (char[] data) {
>> writefln(data);
>> }
>>
>> test2.d
>> import blah;
>>
>> void main () {
>> print("This was successful.");
>> }
>>
>> This can confuse build though, I think.
>
>
> I stand corrected. Thanks James. I thought that this would not compile.
> You have given me a new issue to 'fix' in Build, damn it!
>
Heheh, I thought that was a design decision on your part!
This is not really an issue, though.
It's not build's fault, and there really isn't any effecient way to
always figure out the filename if it doesn't match the module name.
More information about the Digitalmars-d-learn
mailing list