The most basic way to ask my question if there is anyway of doing this would be a program that did: Dim test1 = 1 Dim test2 = 2 Dim test3 = 3 for i = 1 to 3 print testi next i Well this presents problems because it wont treat the i as a number, is there anyway of doing this? Thank you.
Eric wrote: > > The most basic way to ask my question if there is anyway of doing this > would be a program that did: > > Dim test1 = 1 > Dim test2 = 2 > Dim test3 = 3 > > for i = 1 to 3 > print testi > next i You were close; all you need is brackets: dim test(3) as integer test(1) = 1 test(2) = 2 test(3) = 3 for i = 1 to 3 print test(i) next i > > Well this presents problems because it wont treat the i as a number, > is there anyway of doing this? Thank you.
"Eric" <erickit@bellsouth.net> wrote in message news:bd7ac0c8.0401260942.bdbdac6@posting.google.com... > The most basic way to ask my question if there is anyway of doing this > would be a program that did: > > Dim test1 = 1 > Dim test2 = 2 > Dim test3 = 3 > > for i = 1 to 3 > print testi > next i > > Well this presents problems because it wont treat the i as a number, > is there anyway of doing this? Thank you. Not sure of the exact dialect you're looking for but: DIM test (1 to 3) test(1)=1 test(2)=2 test(3)=3 for i = 1 to 3 print test(i) next i HK