Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The C0000005 Fatal Exception Error
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00183223
Message ID:
00183896
Views:
59
>>Hi George,
>>
>>I agree, improper code in recursive routines can cause a world of grief. I've pretty much always tried to avoid recursive routines in Fox. The number of "program levels" is rather limited, and I've always found it's not that difficult in recursive routines to end up many hundreds of "levels" deep. I had done a "seed fill" routine in C once, that while only 4 lines of code, required stack space of ~256K to work. Took an extremely long time to unwind, as it was going about 2000 levels deep! Oh, the days of the 4.77Mhz processors...
>
>Hi Fred,
>
>I've always looked at it from the standpoint of what's needed. If recursion provides the best way to do something, then I use it, if it doesn't I don't. Must admit, I haven't "bumped my head" yet in Fox, but then maybe it's because the number of calls in the routine is very limited.
>
>Interestingly, the personal project that got this thread started is one where I use the most recursion (6 recursive routines). One of these builds the TreeView. In each case, in the course of solving the problems, recursion was simply the easiest, fastest way to do it.

I agree. The best tool for the best job. I avoided recursion for building my TreeView because I had no need to create the entire TreeView at once, only the parts that needed to be seen. I couldn't see the point in loading a 15K node TreeView if all they needed to see was the first level of probably a couple of dozen nodes.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform