[REBOL] Re: variable scopes and recursive func
From: sags::apollo::lv at: 11-Apr-2005 23:55
Thanks, Michael!
Those bindings is unlear for me yet.
But at least those variable scopes stays more clearer.
Now the function is working with "repeat" and sorting list in a
proper way.
Now the problem is how to add depth counter:
readChaptDir2: func [ thisDir depth
/local rez curDepth
] [
curDepth: depth - 1
rez: copy thisDir
repeat aFile sort read thisDir copy/deep [
either #"/" = last aFile [
repend rez [ "<br>dir:" join thisDir aFile
curDepth ]
repend rez readChaptDir2 join thisDir aFile
curDepth
][
repend rez [ <br> aFile ]
]
]
return rez
]
brgds
Janeks
On 11 Apr 2005 at 1:03, Michael Berg wrote: