Re: include statement bugs

new topic     » goto parent     » topic index » view thread      » older message » newer message

Chris Bensler wrote:
> There are 2 problems.
>  
> 1. backslash and forwardslash should work identically, with the 
> behaviour that frontslash.ex demonstrates
> 
>     Using backslash, euphoria thinks that both lib1\test_include.e
>     and lib2\test_include.e are the same file and completely ignores
>     the second.

It's documented that Euphoria ignores the second and subsequent includes
of the same file name (although the directory paths could be different).
I've further clarified the docs about this (just now).

>     Using \ is apparently supposed to be the expected behaviour.
>     The fact that / works at all is considered a bug.

In 2.5, forward slash and backslash are equally supported by
Euphoria on DOS/Windows. Only forward slash will be supported
on Linux/FreeBSD. This is in keeping with what the underlying 
operating systems support.
 
> 2. "lib1\test_include.e" fails
>    Rob Szalay pointed it out to me.
>  
>       F:\empire\projects\include_test\backslash.ex:1
>       can't find lib1 est_include.e in F:\empire\projects\include_test
>       or in f:\empire\include\rds;f:\my empire\include
>       or in f:\empire\include
>       include "lib1\test_include.e" as lib1
>                                           ^
>    Notice also, "can't find lib1 est_include.e".

When you enclose an include path using double quotes,
Euphoria scans the string as it would any other string.
That means it looks for things like \t and \n and \\ and
treats them as a single special character in the string.
There was an example in the manual (which I just fixed) where I
forgot to double up my backslashes when I added double quotes
around an include file path.

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu