JimmyH
November 4th, 2005, 10:55 AM
If you place a for loop in a recursive function with the function call within the loop... will the loop finnish or does it stop working untill the last recursion???
claudio
November 4th, 2005, 12:18 PM
Can you explain what you're doing?
pixelbath
November 4th, 2005, 02:32 PM
If you provide ways for your function to escape recursion (such as end-of-data, or specific conditions), then it will eventually finish. If you're not doing any checking before or in your loop, you could easily run into infinite recursion.
That being said, sometimes it is desirable to continue infininely, sometimes not. It depends on what you're trying to accomplish.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.