Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recursion with foxpro
Message
From
15/01/2006 19:03:03
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01086981
Message ID:
01086988
Views:
65
Hi,
>I was looking for an efficient way of doing this. Because if I'm doing a very simple recursion in foxpro I get an error message : insufficient stack space.

You can increase the stack level in vfp 9.

>Maybe recursion is not the way to do these things in foxpro? In c# I can do it w/o any problem.

Languages compiling to machine code are usually better suited for heavily recursive algorithms, like ackermann function. Such "base benchmarks" mostly good for measuring one facette of a language, but are indicative of the runtime behaviour to be expected in similar situations. If you have *just* a bottleneck with a recursive function necessary for your app, code this in pure c (I mean "recurse in the c code") and call this "recurser" as a fll. You still get vfp's ease of building database apps <g>. If you have lots of "function intensive computations", perhaps c# is a better compromise between needed perf and ease of development. vfp as a bytecode compiler/interpreter has runtime characteristics more in line with python/javascript/non-JITed java - the strength of vfp is in the integrated database engine, the RAD environment, functional and oop programming, SQL and xBase data access, meta data and highly interpretative/introspective programming possibilities. Pure c still has uses, and you can wield them in vfp as well<bg>.

my 0.02 EUR

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform