Alan Wolfe wrote:

Heya guys,
I was wondering if there was a way to do recursion in witango 5?

Yes there is.



my only problem here is that local variables will get overwritten when i call the tcf function again inside itself right?
Method scope would be overwritten too and instance seems like it might work except id have to make a tcf object for each call of the function which that would add alot of overhead right?


No, this is incorrect. Method scoped variables are safe during recursion. You *do* need to stay away from Local/Request scoped variables though. The tricky part is that the default scope (which you can't change) for the Looping index of the for loop action is "Local" therefore you can't do your loops that way. You will need to do them in a while action instead and manage your looping indexes on your own.

Like Dave said, you're on the right track.

/John

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to