Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a function from itself
Message
 
 
To
05/04/2006 05:56:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01109601
Message ID:
01110560
Views:
19
>>>Jim,
>>>As many already said you can do that, however you're right to a point, should you do that:) I tend not to create recursive functions if I can create one that's not recursive (and almost all the time I find a non-recursive one). IMHO recursive code is easier to write but is evil. With recursion you should be very carefull not to overflow stack space and/or nesting levels.
>>>PS: Maybe a perception but looks like generally non-recursive code is faster.
>>>Cetin
>>
>>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 ?

I believe that's what my C++ teacher told us while ago. He gave us some problems to try to write non-recursive solution. I don't remember right now, if I was able to crack them.

In several cases the non-recursive solution is very hard to invent.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform