aommaster Posted June 8, 2008 Share Posted June 8, 2008 (edited) Hey guys! I'm trying to create a simple guessing game (I have nothing better to do ), and what I'd like to have is a variable named according to the values of the variables in the for loop I am used. E.g.: For $i=0 to $max-1 $varname=guictrl....... Next The $varname should take the value of the $i. So, the first control will be assigned a value of 0, then the next one, 1, etc. Is there a way of doing it? Edited June 8, 2008 by aommaster Link to comment Share on other sites More sharing options...
NELyon Posted June 8, 2008 Share Posted June 8, 2008 Hey guys!I'm trying to create a simple guessing game (I have nothing better to do ), and what I'd like to have is a variable named according to the values of the variables in the for loop I am used.E.g.:For $i=0 to $max-1$varname=guictrl.......NextThe $varname should take the value of the $i.So, the first control will be assigned a value of 0, then the next one, 1, etc.Is there a way of doing it?Look up Assign in the helpfile. It would be easier to use arrays though. Link to comment Share on other sites More sharing options...
aommaster Posted June 8, 2008 Author Share Posted June 8, 2008 Look up Assign in the helpfile. It would be easier to use arrays though.Fantastic! Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now