www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Re: Linkage

Note that export don't make much sense in this case. A function in one file
can be used in the other if the file is imported:

module file1;

void foo() {}

module file2;

private import file1;


Lars Ivar Igesund
blog at http://larsivi.net
DSource & #D: larsivi


Which brings up another question:

As I understand it, if file1.d were in a subdirectory, it would be:
import subdir.file1

Suppose file1.d was in the parent (..\file1.d) or parallel (..\dir\file1.d)?
Jul 03 2006