Re: Modified Interpreter

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

----- Original Message ----- 
From: "Igor Kachan" <kinz at peterlink.ru>
To: "EUforum" <EUforum at topica.com>
Subject: Re: Modified Interpreter


> 
> 
> Hello Matt,
> 
> > OK, I've put a Windows and DOS version of the interpreter up.
> > I should get the Linux version working this weekend, and then
> > I'll submit it to Rob. 
> > In the meantime, I've put what I've got on my page:
> > 
> > Interpreter: http://www14.brinkster.com/matthewlewis/exm.zip
> > All projects: http://www14.brinkster.com/matthewlewis/projects.html
> > 
> > Matt Lewis
> 
> I have tried you interpreter, it works same 
> as Official v2.4 for me. 
> My test program is very simple:
> 
> ---a.e
> global integer z
> z=1
> ?z
> ---end of a.e
> 
> ---b.e
> global integer z
> z=2
> ?z
> ---end of b.e
> 
> ---c.e
> global integer z
> z=3
> ?z
> ---end of c.e
> 
> ---z.ex
> include a.e
> include b.e
> include c.e
> ?z
> z=5
> ?z
> integer z
> z=4
> z+=z
> ?z
> include c.e
> global integer z
> z=2
> ?z
> ---end of z.ex
> 
> If I run z.ex on v2.4, I get:
> 
> 1
> 2
> 3
> Z.EX:4
> A namespace qualifier is needed to resolve z.
> z is defined as a global symbol in:
>     C:\DOWNLO~1\EXM\a.e
>     C:\DOWNLO~1\EXM\b.e
>     C:\DOWNLO~1\EXM\c.e
> 
> ?z
>  ^
> 
> If I run z.ex on v2.2, I get:
> 
> C:\EUPHORIA>ex Z.EX
> 1
> C:\EUPHORIA\b.e:1
> attempt to redefine z - defined already in C:\EUPHORIA\a.e
> global integer z
>                ^
> 
> So, v2.4 doesn't run my simple program properly,
> it doesn't see global integer z, defined in a.e,
> inside b.e and c.e. 
> Global integer z of a.e is invisible in b.e and c.e.
> These are the gaps for globals, I think.
> Not good scenario. Just IMHO tho.

I don't think you understand what the rules are for Globals and namespaces. Eu
2.4 is behaving correctly here. Which 'z' do you think that Z.EX should be using
- the one in A.E, B.E, C.E, or Z.EX? And why do you think that?

-- 
Derek

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

Search



Quick Links

User menu

Not signed in.

Misc Menu