Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recursion with foxpro
Message
 
To
16/01/2006 11:21:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01086981
Message ID:
01087285
Views:
40
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
Previous
Reply
Map
View

Click here to load this message in the networking platform