use-revolution digest, Vol 1 #1865 - 13 msgs

David Vaughan dvk at dvkconsult.com.au
Wed Sep 3 18:41:01 EDT 2003


On Wednesday, Sep 3, 2003, at 23:07 Australia/Brisbane, wouter 
<wouter.abraham at pi.be> wrote:

snip
>
> I have been searching for this recursive walkers from  "years" ago but 
> couldn't find those with "depth-first search with pre- or end-order 
> processing". Can you please post the url.
> The other recursive ones are "all" bumping into the recursionLimit. 
> Except one you mentioned at :
> http://lists.runrev.com/pipermail/use-revolution/2002-May/004353.html
> which points to Ben Rubinstein's directory walking function. Which is 
> not a real recursive handler, but a repeat loop buried in a function.  
> Only this script as it is, will not work and has to be corrected.
>

Your comments above puzzle me. I have no need to post the URL because 
you just did. When I click on the url you posted I go to the routine I 
wrote and published myself. It does not mention, point to, and is not 
derived from, anything by Ben.

While always a theoretical possibility, it is nigh-impossible in 
practice that this will bump into a limit, the default recursion depth 
allowing for over 700 directories deep, as Dar has mentioned.

Further, it is a real recursive handler, pre-order, depth-first. The 
fact it is a function is normal for a recursive routine which returns 
data.

The repeat loops within it simply list the files within the directory 
at which you have just arrived (pre-order process) and steps through 
the immediate sub-folders for depth-first recursive searching. What 
here is "not real"?

Finally, it works without "correction". I know because (a) I just 
copied and pasted the code into a test stack and ran it successfully 
and (b) it is the code I already use in other stacks anyway; with zero 
problems of course.

I appreciate your interest in the topic but not the mis-statements 
about recursion or my code.

regards
David




More information about the use-livecode mailing list