i know/think i’ve seen this somewhere, but how do you make a ‘for’ loop using 3 variables and have as go thru the script each time using the next var in the list, something like this:
pseudocode:
(for x, y, z; condition; incr){
1st time: x = function(x);
2nd time: y=function (y);
3rd time: z=function(z);
}
pseudocode:
(for x, y, z; condition; incr){
1st time: x = function(x);
2nd time: y=function (y);
3rd time: z=function(z);
}
does this make sense?
-mojo **
thats not really explaining enough. Wheres the incr in all this? How are x y and z effected? If you just want to alternate through the variables as you progress through the loop you can use something like this:
for (i=0; i< 10; i++){
switch(i%3){
case 0: x=function(x); break;
case 1: y=function(y); break;
case 2: z=function(z);
}
}
as you can see it ain’t much, but i’m on a huge kick of trying to break all my code down as far as possible–is it even worth the effort to save 4 lines?
Half the time… Shortening your code like that can just screw up your cod… And then you have to spend some time to just fix it… Just use 3 loops if need be and go with it like that…