jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Re: Re: __FILE__ and path_rel


Guenter Milde wrote:

> assume windows:  path_rel("c:\a\b", "e\..\f")  == ??
> assume windows:  path_rel("c:\a\b", "e/../f")  == ??

I suppose you meant to write "\\" for every "\".

Then the first call is not ok for path_rel, because the
2nd argument is expected to be a relative file spec
in Unix-notation. The second call will return  c:\a\b\f.

> Why not have a function
> define __path__()
> {
>    path_dirname(__FILE__);
> }
> 
> and use this in your examples?
>   variable html_mode_path = __path__()
> or    
>   variable html_mode_path = path_concat(__path__(), "html");
> ?

This will not work. The return value will be always the same.
__FILE__ refers to the file, where you refer to __FILE__.

Of course, my intention is not to create a variable for each
directory in question, nor for each file in question.

Probably my examples would be better readable as:
$1= path_rel( __FILE__,"../some_modes_from_xy/");
autoload("fir_mode",$1+"firmode.sl");
autoload("sec_mode",$1+"secmode.sl");
...

Klaus


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]