Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recursion with foxpro
Message
 
À
16/01/2006 11:21:23
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01086981
Message ID:
01087285
Vues:
39
Hi Cetin,
You're right I can solve the functions with iteration. But for a non-programmer it is easier to write with recursion.

>
>This actually reminded me of my Prolog days where recursion (or in English is it recur?) was an important concept. I needed many times to adjust stack size manually (and finding the correct size was more luck rather than knowledge:)> There I learnt a good principle though:
>"Every recursion problem might have a non-recurring solution". If I find it I use it:)
>For Zakaria's problem isn't it this?
>
>Function aa(n)
> Local ix,lnResult
> lnResult = 0
> For ix = 1 To N
>  lnResult = 1 + 1/(1+0.04) * m.lnResult
> Endfor
> Return m.lnResult
>Endfunc
>
Cetin
Zakaria al Azhar
My blog on Actuaris.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform