Re: My not-quite obsolete namespace parser

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

On  0, Robert Craig <rds at RapidEuphoria.com> wrote:
> 
> Derek Parnell writes:
> > In file 'a.e' enter these three lines...
> >
> >  global myval
> >  myval = 1
> >  ? 1
> >
> > In the file 'b.ex' enter these two lines...
> >
> >  include ./a.e
> >  include a.e
> >
> > Now execute b.ex. When I do this I get ...
> >
> > 1
> > 1
> 
> If I correct "global myval" to "global integer myval",
> and I correct "./a.e" to ".\a.e", then
> it correctly prints a single "1" on DOS or Windows.
> 
> Or if I use "./a.e" on Linux or FreeBSD it also
> correctly prints a single "1".
> 
> Euphoria assumes "\" in file paths on DOS and Windows,
> and "/" and Linux and FreeBSD. If you have something else
> it just passes it through to the O/S. It looks like DOS and Windows
> will accept "/" in some cases (but not all).
> Linux and FreeBSD never accept "\".
> 
> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    http://www.RapidEuphoria.com

No, that was my mistake. I believe that was a bug in the alpha? version
of
Eu 2.3, but it seems to work fine under my comp with the most recent
version.

However, I also found another bug:

(in /opt/linux, $EUDIR = /opt/euphoria, /opt/linux is a symlink to
$HOME/space)

if i put this in a.exu and run it

include get.e
include ../euphoria/include/get.e --really /opt/euphoria/include/get.e

works, but making a.exu

include ../euphoria/include/get.e

claims that "../euphoria/include/get.e" cannot be found when run.

In fact, when I make it

include get.e
include ../euphoria/get.e --really /opt/euphoria/get.e

it still runs, despite the fact that ../euphoria/get.e does not exist!

For my namespace parser, the first and third cases will fail like the
second,
unlike exu which lets them continue to run and reports no errors.

Also, if i create $HOME/euphoria/get.e and put in it

global atom foo
foo = 1

and make a.exu

include get.e
include ../euphoria/get.e --really $HOME/euphoria/get.e
? foo

I get an error saying foo has not been declared???

even if I make a.exu (which my parser does btw)

include /opt/euphoria/include/get.e
include /home/jbrown/euphoria/get.e
? foo

It still fails???

it seems clear to me that this is a bug.

jbrown



-- 
http://fastmail.fm - 100% lightning

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

Search



Quick Links

User menu

Not signed in.

Misc Menu