How does one declare an array in VBScript? -


i used in excel , works fine.

dim varscreen (0 2) string varscreen(0) = "sample 1" varscreen(1) = "sample 2" varscreen(2) = "sample 3" 

i trying translate array vbscript keep getting error:

line: 14 error: expected ')' 

i have tried various options, removed as string, dim varscreen array still error.

what proper syntax?

vbscript's (variables and) arrays can't typed, no "as whatever". vbscript's arrays zero-based, no "(x y)" "(z)" z last index (not size) of array. in code:

>> dim varscreen(2) >> varscreen(0) = "sample 1" >> varscreen(1) = "sample 2" >> varscreen(2) = "sample 3" >> wscript.echo join(varscreen, "|") >> sample 1|sample 2|sample 3 >> 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -