If there is two for loops, one being placed inside another, how will it execute.
Example:
for(forloop1; forloop1; forloop1++){
for(forloop2; forloop2; forloop2++){
}
}
Would it execute forloop2 to its end then loop back to forloop1 + 1 then do forloop2 to its end?
I'm trying to do an x,y mapping system dynamically created from a database. I need it to start at the smallest y then do every x value on that y axis, proceeding to next y value and doing every x value for that y vertices value.
Example:
Range is -10,-10 to 10,10.
I need to come up with an algorythm that will do all variables in that range.
ie. -10,-10 .. -10,-9 .. -10,-8 ... etc.. -10,10
-9,-10 .. -9, -9 ... etc.. -9, 10
So on and so forth.. I'm having problems trying to come up with this. Any ideas?