arrays - Can't create a variable in a while loop in VBScript? -



arrays - Can't create a variable in a while loop in VBScript? -

this code causes error me:

i = 0 set colors = createobject("scripting.dictionary") while < 7 if true dim a(1) a(0) = "go" a(1) = "try" colors.add "space", end if = + 2 loop

i'm not sure why. need similar, initialize dictionary 1 array each key, while loop seems messing up. suggestions? thanks!

once you've dimmed array, cannot dimmed again. can, however, redimed. dim outside loop. if want clear array during each loop, can 1 of following:

redim a(1) ' redim without 'preserve' clear array ' or erase

arrays vbscript

Comments

Popular posts from this blog

ruby on rails - Devise Logout Error in RoR -

model view controller - MVC Rails Planning -

php - Working with pretty urls on apache and fastcgi after hhvm installation -