Re: Simple import question

2014-10-16 Thread Rei Roldan via Digitalmars-d-learn
On Wednesday, 15 October 2014 at 16:11:22 UTC, Steven Schveighoffer wrote: *snip* You might of missed Adam's response up there: But the best way is to explicitly pass all the file names to the compiler: dmd yourfile.d file2.d folder/file3.d and so on... Doing that will serve you best in

Re: Simple import question

2014-10-16 Thread Sag Academy via Digitalmars-d-learn
On Thursday, 16 October 2014 at 10:59:29 UTC, Rei Roldan wrote: On Wednesday, 15 October 2014 at 16:11:22 UTC, Steven Schveighoffer wrote: *snip* You might of missed Adam's response up there: But the best way is to explicitly pass all the file names to the compiler: dmd yourfile.d

Re: Simple import question

2014-10-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/16/14 6:59 AM, Rei Roldan wrote: On Wednesday, 15 October 2014 at 16:11:22 UTC, Steven Schveighoffer wrote: *snip* You might of missed Adam's response up there: But the best way is to explicitly pass all the file names to the compiler: dmd yourfile.d file2.d folder/file3.d and so

Re: Simple import question

2014-10-15 Thread Rei Roldan via Digitalmars-d-learn
I don't see how passing all required files to the compiler could possible raise an issue with module discoverability. Unless I'm missing something? In regards to pains if folder|file names / package|module names don't match, imho, physical organization of files should never (ever) be of any

Re: Simple import question

2014-10-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/15/14 4:59 AM, Rei Roldan wrote: I don't see how passing all required files to the compiler could possible raise an issue with module discoverability. Unless I'm missing something? In regards to pains if folder|file names / package|module names don't match, imho, physical organization of

Re: Simple import question

2014-10-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, October 15, 2014 12:11:22 Steven Schveighoffer via Digitalmars-d- learn wrote: On 10/15/14 4:59 AM, Rei Roldan wrote: I don't see how passing all required files to the compiler could possible raise an issue with module discoverability. Unless I'm missing something? In regards

Simple import question

2014-10-09 Thread WhatMeWorry via Digitalmars-d-learn
Hope this question is not too simple minded but, In the TDPL it says: To import one module from another, specify the name of the module in an import declaration. The name must include the relative path computed from the directory where compilation takes place Ok, but how does one

Re: Simple import question

2014-10-09 Thread via Digitalmars-d-learn
It's the current working directory, i.e. the directory from where you run the compiler. IDEs usually use the root directory of the project as working directory.

Re: Simple import question

2014-10-09 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 9 October 2014 at 18:21:32 UTC, WhatMeWorry wrote: To import one module from another, specify the name of the module in an import declaration. The name must include the relative path computed from the directory where compilation takes place This is not true. It is a REALLY

Re: Simple import question

2014-10-09 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/9/14 3:30 PM, Adam D. Ruppe wrote: On Thursday, 9 October 2014 at 18:21:32 UTC, WhatMeWorry wrote: To import one module from another, specify the name of the module in an import declaration. The name must include the relative path computed from the directory where compilation takes place

Re: import question

2012-01-25 Thread Manu
On 23 January 2012 12:47, Don Clugston d...@nospam.com wrote: On 22/01/12 03:56, Nick Sabalausky wrote: Jonathan M Davisjmdavisp...@gmx.com wrote in message news:mailman.670.1327197408.**16222.digitalmars-d@puremagic.**com... On Saturday, January 21, 2012 22:28:20 equi...@atw.hu wrote:

Re: import question

2012-01-25 Thread Timon Gehr
On 01/25/2012 01:33 PM, Manu wrote: On 23 January 2012 12:47, Don Clugston d...@nospam.com mailto:d...@nospam.com wrote: On 22/01/12 03:56, Nick Sabalausky wrote: Jonathan M Davisjmdavisp...@gmx.com mailto:jmdavisp...@gmx.com wrote in message

Re: import question

2012-01-23 Thread Don Clugston
On 22/01/12 03:56, Nick Sabalausky wrote: Jonathan M Davisjmdavisp...@gmx.com wrote in message news:mailman.670.1327197408.16222.digitalmar...@puremagic.com... On Saturday, January 21, 2012 22:28:20 equi...@atw.hu wrote: Should not module C see c1? Because it cannot see it. Even if the import

import question

2012-01-21 Thread equinox
Hi, I have an import related questoin.. I have this: module A; const c1=4; module B; import A; module C; private import B; Should not module C see c1? Because it cannot see it. Even if the import is not private. Regards Marton Papp

Re: import question

2012-01-21 Thread Jonathan M Davis
On Saturday, January 21, 2012 21:22:22 equi...@atw.hu wrote: Hi, I have an import related questoin.. I have this: module A; const c1=4; module B; import A; module C; private import B; Should not module C see c1? Because it cannot see it. Even if the import is

Re: import question

2012-01-21 Thread equinox
Should not module C see c1? Because it cannot see it. Even if the import is not private. No. imports are private by default There's no point in marking them as private. If you want module C to see what module B is importing, then module B needs to import it publicly. e.g. module B;

Re: import question

2012-01-21 Thread Jonathan M Davis
On Saturday, January 21, 2012 22:28:20 equi...@atw.hu wrote: Should not module C see c1? Because it cannot see it. Even if the import is not private. No. imports are private by default There's no point in marking them as private. If you want module C to see what module B is importing,

Re: import question

2012-01-21 Thread Nick Sabalausky
Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.670.1327197408.16222.digitalmar...@puremagic.com... On Saturday, January 21, 2012 22:28:20 equi...@atw.hu wrote: Should not module C see c1? Because it cannot see it. Even if the import is not private. No. imports are