module vs import

Robert Fraser fraserofthenight at
Wed Jun 4 21:42:54 PDT 2008

hukedonfonix wrote:
> I'm having some trouble understanding how module differs from import. As far as i see it they both pretty much do the exact same thing, ie allow you access to functions, classes etc. of another .d file. Or am i overlooking something quite basic and obvious here?

The "module" keyword is used to assign a name to your module (which 
incidentally must coincide with its filename & folder structure) while 
"import" gives you access to the module with the given name.

More information about the Digitalmars-d-learn mailing list