Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a function from itself
Message
De
05/04/2006 16:46:35
 
 
À
05/04/2006 09:20:47
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01109601
Message ID:
01110780
Vues:
23
>>>Both points are correct. In some cases, however, it's very hard to write a non-recursive code. However, each recursive problem has non-recursive solution.
>>
>>Are you sure ?
>
>According to the article in Wikipedia: "Any function that can be evaluated by a computer can be expressed in terms of recursive functions, without use of iteration, and conversely."
>
>This seems to be the general belief; I am not sure whether it has actually been proven.

Sure, but exists two class of function:
those that equire for to memorize some intermediary information to every iteration or recursion (on an stack) and those that don't require it.
The first ones are "pure ricorsive function", and even if a loop can be performed,
in reality the iteration it simulates the recursion;
the seconds are "pure iterative function" and it is the recursion that simulates the iteration
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform