If I set up a dictionary as such:
set myDict = CreateObject("Scripting.Dictionary")
I ask a user his name.
Wscript.StdOut.WriteLine "What is your name: "
name = Wscript.StdIn.ReadLine
I then ask the user for five numbers.
Wscript.StdOut.WriteLine "Enter a number: "
num1 = cint(Wscript.StdIn.ReadLine)
Wscript.StdOut.WriteLine "Enter a number: "
num2 = cint(Wscript.StdIn.ReadLine)
Wscript.StdOut.WriteLine "Enter a number: "
num3 = cint(Wscript.StdIn.ReadLine)
Wscript.StdOut.WriteLine "Enter a number: "
num4 = cint(Wscript.StdIn.ReadLine)
Wscript.StdOut.WriteLine "Enter a number: "
num5 = cint(Wscript.StdIn.ReadLine)
and place the five prompted numbers into any array using ArrayList
Set myArrayList = CreateObject( "System.Collections.ArrayList" )
myArrayList.Add num1
myArrayList.Add num2
myArrayList.Add num3
myArrayList.Add num4
myArrayList.Add num5
If I add a key with name
in the dictionary that I set up.
myDict.Add name
Can I add myArrayList
as a value to name
in the myDict
dictionary I previously set up.
and if so,how can I append or add to myArrayList
if I were to loop the five number questions?