On Fri, 17 Sep 2004 21:24:35 -0700, Steve Fink <[EMAIL PROTECTED]> wrote:
> On Sep-17, Matt Diephouse wrote:
> > o Calling subroutines from an eval creates a copy of the user stack,
> > so all changes are lost (rendering my Forth code unusable). Is this
> > behavior correct? If so, how should I go about this?
> 
> Dunno. Don't use an Eval? (Use a plain Sub or something instead)

I should have explained things a bit more clearly here. I have a
PerlHash in forth.pir that contains a Sub for each supported
operation. I store this as a global.

I then build up a string of PIR that locates subroutines from the
global PerlHash and invokes them. I compile this string and execute
it.

Every time I invoke one of the subroutines from the PIR string I've
compiled, I get a new copy of the user stack, which means that I am
unable to alter it with any of my subroutines.

This seems like a bad thing to me as I try to implement this. But
maybe I just don't understand how implement this correctly?

-- 
matt

Reply via email to