Computer Science Canada nested loop help |
Author: | manwinder [ Tue Jun 12, 2012 3:24 pm ] | ||||
Post subject: | nested loop help | ||||
i was having problems with this code, this code is just a example of what my code does, so don't try to change the way i am doing it in.
the problem i am having is the for loop exits when i want only the normal loop to exit, like i want it to move to the next gamecounter and loop again. how o i get this to only leave the loop and not the for loop. also i tried using a for loop inside a for loop but the only way that can work is if i can change the values it goes to, so like this( i already tried it, it don't work):
i need it to leave the loop inside when a boolean turns true |
Author: | Tony [ Tue Jun 12, 2012 3:31 pm ] | ||
Post subject: | RE:nested loop help | ||
the for-loop doesn't exit, it simply completes all of its iterations
|
Author: | manwinder [ Tue Jun 12, 2012 3:38 pm ] |
Post subject: | RE:nested loop help |
but the exit when, exits both loops, i need it to exit only the inside loo[ |
Author: | Tony [ Tue Jun 12, 2012 6:50 pm ] |
Post subject: | RE:nested loop help |
no, it does not exit the outer loop. See exit |
Author: | manwinder [ Tue Jun 12, 2012 6:52 pm ] | ||
Post subject: | RE:nested loop help | ||
i swear it does, i use this line
i tried a loop within a loop, loopception or nested loop, it does exit the outer loop, i will update this tomorrow |
Author: | copthesaint [ Wed Jun 13, 2012 10:34 am ] | ||
Post subject: | Re: nested loop help | ||
You swear it does, really, because ive spent 5 years messing around with turing for fun and Its never done that once.
Your arguing with someone who is in university for I dont know how long studing computer science. |
Author: | Raknarg [ Wed Jun 13, 2012 1:00 pm ] |
Post subject: | RE:nested loop help |
No need for rudeness here. Alright, so it sounds like you have more code to show, it might make more sense if you do. It might just have to do with how you're writing it out. |
Author: | manwinder [ Wed Jun 13, 2012 3:36 pm ] |
Post subject: | RE:nested loop help |
haters gonna hate, i found out that one of the variables in the for loop was set to 1 and not what the user inputted |
Author: | Raknarg [ Wed Jun 13, 2012 8:19 pm ] |
Post subject: | RE:nested loop help |
Haha that was going to be my next thought ![]() 1 always equals 1 |