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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement