weirdwes
03-10-2004, 08:11 AM
I searched the forums and google and I kept ending up at irrelevant pages. Perhaps I wasn't searching for the correct term.
Imagine I have a set of variables (Item1 - Item10) and I want to do something with their values. (anything really). How can I set up a FOR LOOP that will count from 1-10, add that as "string" to the end of "item" and then do my thing. Yes this would be easier with arrays, but it has others uses, I just need to know how to do it. :D
The way I do it now (yikes)
Var item1 = "";
Var item2 = "";
Var item3 = "";
(etc)
How can I do it like this?
For (X=1; X <= 10; X++;) {
Var item+x = "";
}
This is probably really easy. :p
Thanks!
Imagine I have a set of variables (Item1 - Item10) and I want to do something with their values. (anything really). How can I set up a FOR LOOP that will count from 1-10, add that as "string" to the end of "item" and then do my thing. Yes this would be easier with arrays, but it has others uses, I just need to know how to do it. :D
The way I do it now (yikes)
Var item1 = "";
Var item2 = "";
Var item3 = "";
(etc)
How can I do it like this?
For (X=1; X <= 10; X++;) {
Var item+x = "";
}
This is probably really easy. :p
Thanks!