Re: Passing parameters in a recursive procedure
Martin Klang <[email protected]> Sun, 3 Oct 2004 22:00:06 +0100
| Newsgroups | gmane.text.xml.o-xml |
|---|---|
| Message-ID | <[email protected]> |
On 3 Oct 2004, at 20:12, Christophe Chenon wrote: > I've just started to play with o:xml and I love it already... that's so nice! > I have a question related to the fact that parameters are passed by > reference. I think what you're seeing is quite simply a bug. Parameters are passed by ref as you say, but the value types (String, Number, Boolean) are immutable - any operations on them produce new values rather than change the object state. The current interpretor uses a simple stack mechanism whereby the variables currently in scope are 'hidden' when a function call is made. It should be done the same way for procedure calls. Instead it seems the recursive procedure call sets the same 'number' variable that is already being used. I'm currently doing some deep compiler refactoring for the next version, I'll fit in a fix for this. If you can, pls report the problem on bugzilla: http://bugz.pingdynasty.com thanks Christophe, speak more soon! /m