Hello
I'm fairly new to vbscript and I'm struggling a little as I'm more familiar with Javascript. Can someone please give me a hand?
Does vbscript allow the use of named array keys like I have in my example below?
For example I have:
Dim result(3)
result(age) = 60
result(firstname) = "Tony"
result(height) = 187
result(weight) = 76
msgbox("Age: " & result(age) & vbCr &_
"Name: " & result(firstname) & vbCr &_
"Height: " & result(height) & vbCr &_
"Weight: " & result(weight) )
The resulting msgbox shows:
Age: 76
Name: 76
Height: 76
Weight: 76
This seems to assign every element in the result array to 76, which should only be assigned to the "weight" element.
Is this happening because vbscript only accepts integers as the key/ index for arrays?
Any help is greatly appreciated.
Thanks Turgs