Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recursion with foxpro
Message
De
16/01/2006 11:31:17
 
 
À
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:
01087207
Vues:
38
>>>>>>>Sure, you can call a function from within that function. How that must be done with the above equation is your endeavour. :)
>>>>>>
>>>>>>Recursion isn't just a function calling a function. It is a function calling a very special function, namely itself.
>>>>>
>>>>>Understood. But isn't that exactly what I said? ...you can call a function from within that function...
>>>>
>>>>Not really, but we might just be splitting hair.
>>>>you can call a function from within that function
>>>>It is not just a function.
>>>>
>>>>I am sure you know exactly what recursion means and all this is just semantics.
>>>>
>>>>On the lighter side. Here is the definition of recursion.
>>>>Recursion: See recursion.
>>>
>>>Hmm I bet you would get a stack overflow with this definition:)
>>>Cetin
>>
>>LOL yeah especially in VFP. Well I guess it is usefull to have a way to terminate the recursion regardless of language. I got my "definition" from a popular game in the 90's (Moneky Island). The definition has kinda stuck with me.
>>I think it was in one of Hilmar Z's articles where he wrote this about recursion:
>>"To make yogurt, you need milk and yogurt."
>
>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

I was thinking along the same line.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform