1. include-paths (Rob Craig)

Here's something that I can find quite annoying:

Say that I have a file called FOO.EX in wich I do the following

  include inc\bar.e


where "inc" is a subdirectory to the same directory that FOO.EX belongs to. 
Now, if I include a third file in BAR.E (wich is in the same directory as 
BAR.E), like this:

  include grill.e

I will get an error saying "can't find c:\...\grill.e". To make it work I 
have to write "include inc\grill.e" instead.
My question is; why can't Ex look for include files in the directory of 
their direct "parent" (BAR.E in this case), and not only in the directory of 
FOO.EX ?

new topic     » topic index » view message » categorize

2. Re: include-paths (Rob Craig)

> Here's something that I can find quite annoying:
> 
> Say that I have a file called FOO.EX in wich I do the following
> 
>   include inc\bar.e
> 
> 
> where "inc" is a subdirectory to the same directory that FOO.EX belongs to. 
> Now, if I include a third file in BAR.E (wich is in the same directory as 
> BAR.E), like this:
> 
>   include grill.e
> 
> I will get an error saying "can't find c:\...\grill.e". To make it work I 
> have to write "include inc\grill.e" instead.
> My question is; why can't Ex look for include files in the directory of 
> their direct "parent" (BAR.E in this case), and not only in the directory of 
> FOO.EX ?

This would be very useful to me also, atm I do it by having all
programs include files as ..\directory\include.e

It's useful to have include files in separate directories, you can
include documentation and test programs with them while keeping it
separate from the main program and the other includes.

Thomas Parslow (PatRat) ICQ #:26359483
Rat Software
http://www.rat-software.com/

new topic     » goto parent     » topic index » view message » categorize

3. Re: include-paths (Rob Craig)

stabmaster writes:
> My question is; why can't Ex look for include files in the 
> directory of their direct "parent" (BAR.E in this case), 
> and not only in the directory of FOO.EX ?

Thanks for the suggestion.
Others have made similar suggestions.
I'll consider it if/when I get around to making
changes to the include mechanism.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

4. Re: include-paths (Rob Craig)

On 8 Apr 2001, at 10:10, Robert Craig wrote:


> 
> stabmaster writes:
> > My question is; why can't Ex look for include files in the 
> > directory of their direct "parent" (BAR.E in this case), 
> > and not only in the directory of FOO.EX ?
> 
> Thanks for the suggestion.
> Others have made similar suggestions.
> I'll consider it if/when I get around to making
> changes to the include mechanism.

This comes under the heading "Making It Smarter". After all, if i need 
something, i'll first look around me where i am, before i book a plane to 
Alaska to look for it there. Interpreters should be mind-bogglingly smarter 
than they are now, but without the unannounced and pseudo-random context 
shifts of REBOL.

Kat

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu