Hello there..
I need some creative help
Problem is this:
Got a function which needs to check for multiple conditions. After one condition has been checked it has to start the function all over again. This should be done numerous times untill all conditions have been met.
I've been thinking of several solutions to this, but they all seem to have flaws:
* Re-function call inside function: Creates overflow after a certain number of run-thews, since the old instance of the function is still in the memory.
* Goto start of function: Well, works the best, but everyone who saw the code would kill me - so this is a no-no due to personal preference.
* 2x Do/while around all code and use break to exit the nested scope, and start the nested do/while all over: I wouldn't be able to use do/while's or while's inside the code that should check conditions, due to breaking out only 1 scope.
Anyone has any ideas?
Example of code would be like:
Code:main() { if (condition1) {//code} if (condition2) {//code} ...... //go back to start of main() }