How to stop recursion and/or restart the current function with updated variables?

I do not get what you are trying yo do, however based on the fact that return stop the execution in the secondFunction, and thisArray is never changed, you can add a loop to the firstFunction: function firstFunction(thisArray, existingArray){ var restart = true; while(restart) { restart = false; for(test1=0;! Restart && test1existingArraytest20){ // do a bunch of stuff to existingArray, now that existingArray has changed, the whole process needs to start again FROM THE BEGINNING! Return true.

Thanks Scrum Meister. To get into the guts of what I'm doing is quite confusing. I didn't want to cloud the problem with a bunch of stuff not relevant to the bit I was having difficulty with.

This question is the starting pointstackoverflow.com/questions/4485262/java..., and from there I decided that if I sorted all the times in one array, then looked for conflicts, adjusted to the conflicts and tracked which time was unavailable in a separate array, I could go through them recursively and make adjustments. I'm not sure if your solution is working yet. – pedalpete Dec 21 '10 at 5:41.

Some things I noticed: in secondFunction() you access test1 even though you have a parameter t1 the second call to secondFunction() doesn't contain that last parameter the second call to secondFunction() doesn't have a return before it even though you mentioned it in your OP there's a line else if (jQuery. InArray(check, thisArray==-1){, which is missing a ")" there's a line if(thisArraytest1existingArraytest20){ missing a "" in for(test1=0; test1Length; test2++){ it should be for(var test2... to let the parser know it's a variable on its own in the recursion (assuming you want this to happen of course) ... I'm saying that you edited the code to post it here. That is fine of course, but it makes me believe that some part of the code is missing.As far as the missing vars is concerned, that may be in your interest, but the parser may get confused.

If there's no var the variable is defined at document-level, not at function-level nor at the innermost scope. I don't know if you aware of this or if it's an issue.

Sorry about the errors in the post sjngm, I was retyping from one computer which had the code onto another where I've got stack. I did mention in the post that I had shortened the code so that there wasn't confusion with all the other stuff going on. I knew what the problem was, just not the solution.

I'll be more careful with my retyping in the future and will test the code before posting. – pedalpete Dec 21 '10 at 20:07.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions