Was wondering if I could get some help on this simple code.
I am trying to learn how to pass an array?
Im getting error "subscript out of range"
option explicit
dim myArray (13)
dim i
call var (myarray())
for i = 0 to 12
wscript.echo myarray(i)
next
sub var (arrayVAR())
dim x, j
x = 0
for j = 0 to 12
x = x + 1
arrayvar(j) = x + 5
next
redim arrayvar(50)
end sub
I searched through some therds and couldn't find any help, but if there is already a therd please just give me the link.
Thanks for any help.
I am trying to learn how to pass an array?
Im getting error "subscript out of range"
option explicit
dim myArray (13)
dim i
call var (myarray())
for i = 0 to 12
wscript.echo myarray(i)
next
sub var (arrayVAR())
dim x, j
x = 0
for j = 0 to 12
x = x + 1
arrayvar(j) = x + 5
next
redim arrayvar(50)
end sub
I searched through some therds and couldn't find any help, but if there is already a therd please just give me the link.
Thanks for any help.