Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recursive
Message
From
22/08/1999 05:29:36
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
22/08/1999 02:36:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00256374
Message ID:
00256380
Views:
32
>Hi,
> How to have recursive that nested more than 128 level? I tried to use proceudre, but not works...
>
>Thank you

You're probably getting a "Do nesting too deep" error, right? Well, it's a limitation of Fox - but anyway, going too deep with recursion wasn't too good a practice anyway, it always was a resource hog.

One thing you can do is to have an array of things which need to remembered from level to level, and iterate down your array in an outer loop, increasing and/or decreasing a level variable, which then points to the current row of the array. The array actually simulates the stack - one row per level - and that should give you a couple of thousands of levels (keep in mind you can only have a total of 65000 elements in an array). If this is not enough, create a cursor instead of the array, and you'll have more depth than you'll ever need. But then, why would you need such a deep recursion? Such a design probably needs rethinking, IMHO.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform