Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recursion with foxpro
Message
 
À
15/01/2006 19:03:03
Thomas Ganss (En ligne)
Main Trend
Frankfurt, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01086981
Message ID:
01087286
Vues:
46
Hi Thomas,
Can I write a c function and call this function in foxpro and passing parameters to it? If so could you give an example how to do this.

Thanks.

>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
Zakaria al Azhar
My blog on Actuaris.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform