Re: Importing local modules in C style

2015-08-10 Thread Binarydepth via Digitalmars-d-learn
On Thursday, 25 June 2015 at 14:10:00 UTC, Steven Schveighoffer wrote: On 6/25/15 9:57 AM, Binarydepth wrote: I want to import a module from my local project in C style (#include local.h). No. I know I can do dmd main.d local.d but I wonder if it can be done C style. What is your

Re: Importing local modules in C style

2015-06-26 Thread via Digitalmars-d-learn
On Thursday, 25 June 2015 at 13:57:35 UTC, Binarydepth wrote: I want to import a module from my local project in C style (#include local.h). You can theoretically do this with `mixin(import(local.d));`. This will more or less copy-paste the content of local.d into the current scope. You

Re: Importing local modules in C style

2015-06-25 Thread jmh530 via Digitalmars-d-learn
On Thursday, 25 June 2015 at 17:20:46 UTC, jmh530 wrote: On Thursday, 25 June 2015 at 14:37:28 UTC, Binarydepth wrote: I organize some exercises in some source files, it's more how I like to work with C. I'm used to organize source files this way and I was wondering if this was possible with

Re: Importing local modules in C style

2015-06-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/25/15 9:57 AM, Binarydepth wrote: I want to import a module from my local project in C style (#include local.h). No. I know I can do dmd main.d local.d but I wonder if it can be done C style. What is your goal? Why doesn't D import work for you? -Steve

Re: Importing local modules in C style

2015-06-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/25/15 10:37 AM, Binarydepth wrote: On Thursday, 25 June 2015 at 14:10:00 UTC, Steven Schveighoffer wrote: On 6/25/15 9:57 AM, Binarydepth wrote: I want to import a module from my local project in C style (#include local.h). No. I know I can do dmd main.d local.d but I wonder if it

Importing local modules in C style

2015-06-25 Thread Binarydepth via Digitalmars-d-learn
I want to import a module from my local project in C style (#include local.h). I know I can do dmd main.d local.d but I wonder if it can be done C style. Thank you BD

Re: Importing local modules in C style

2015-06-25 Thread Binarydepth via Digitalmars-d-learn
On Thursday, 25 June 2015 at 14:10:00 UTC, Steven Schveighoffer wrote: On 6/25/15 9:57 AM, Binarydepth wrote: I want to import a module from my local project in C style (#include local.h). No. I know I can do dmd main.d local.d but I wonder if it can be done C style. What is your

Re: Importing local modules in C style

2015-06-25 Thread jmh530 via Digitalmars-d-learn
On Thursday, 25 June 2015 at 14:37:28 UTC, Binarydepth wrote: I organize some exercises in some source files, it's more how I like to work with C. I'm used to organize source files this way and I was wondering if this was possible with D. If the files are in the same folder, just import