:-) Sorry, I maybe posted it too fast. I'm still searching for the the why.
I think that's one of the bad parts of Rebol. This dynamic binding might be powerful, but it causes a lot of trouble as well. For instance besides your note, I don't get right now why it for instance without copy/deep brings up an error when it encounters an empty directory, und with copy/deep it runs. (at least without the error message) Nevertheless it works with copy deep if you add in the argument section a "/local rez". I think you forgot to make rez local to the function as it is by standard global and gets everytime deleted. :-) Michael On Sun, 10 Apr 2005 23:13:14 +0300, <[EMAIL PROTECTED]> wrote: > > Thanks! > I noted this (copy/deep), but now it is working without errors, > but not corectly: > First line is wrong - first directory of base dir is added, > and then just files of base dir. > > brgds > Janeks > > On 10 Apr 2005 at 22:44, Michael Berg wrote: > >> >> Hi, >> >> if you change the repeat line to >> >> repeat aFile read thisDir copy/deep [ >> >> it will work, as repeat modifies the block to be repeated. See also at >> http://www.rebol.com/docs/words/wrepeat.html the user comment from >> Ladislav. >> >> Didn't know this myself - until now. :-) >> >> Michael >> >> >> >> On Sun, 10 Apr 2005 21:36:25 +0300, <[EMAIL PROTECTED]> wrote: >> >> > >> > Hi, Rebolers! >> > >> > I am new in rebol scopes. So it seems, that it cause problems in my >> > recursive directory reading function. Could somebody give me a bit >> > more description about variable scopes in following case: >> > >> > readChaptDir2: func [ thisDir ] [ >> > rez: copy thisDir >> > repeat aFile read thisDir [ >> > either #"/" = last aFile [ >> > repend rez [ "<br>dir:" join thisDir aFile ] >> > repend rez readChaptDir2 join thisDir aFile >> > ][ >> > repend rez [ <br> aFile ] >> > ] >> > >> > ] >> > return rez >> > ] >> > >> > Looking forward, >> > >> > Janeks >> > >> >> >> -- >> To unsubscribe from the list, just send an email to >> lists at rebol.com with unsubscribe as the subject. >> >> > > > -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
