Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Parse and and recursion local variables?

From: petr:krenzelok:trz:cz at: 17-Mar-2007 19:34

Volker Nitsch wrote:
> My typicall way to do that is my own stack. > stack: copy[] > parse rule[ > (insert/only stack reduce[local1 local2]) > rule ;recursion > (set[local local2] first stack remove stack) > ] >
Guys, got to go to have few beers tonight with my friends, but - that kinda sucks ;-) I can guarantee you, that most novices, like me, will swear like mad when developing and touching first recursion. I think, that rebol's aproach of implicit global nature of words, even those inside functions, is the main hell for novices :-) One quick question - how is that with function recursion? Can I have local function value to one level of recursion call? And then shared one? I know I can build my own stack, but ... :-) And if it is possible with functions, parser should explicitly behave like that, even if it breaks rebol rules :-) Will try with recursive function or stack later ... -pekr-