All,
I have a set of variables, with similar names, except for the last character. So for instance, lets say that I have three variables var1, var2, and var3. My problem is that I am trying to refer to these variables using a loop, and I am not quite sure how to make it work. Here is an example of my code. x = 1 while(x < =3) puts var[x] x += 1 end In this example, I am trying to print var1, var2, and var3 to the screen with the while loop. So what I am asking is how do I make the 'x' be recognized as a variable. In other instances, I have used #{}, but that does not seem to work in this case. I can elaborate if this is not clear. Thanks in advance for all help. - Shelton _________________________________________________________________ See how Windows Mobile brings your life together—at home, work, or on the go. http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---