如果我这样设置字典:
set myDict = CreateObject("Scripting.Dictionary")
我问一个用户他的名字。
Wscript.StdOut.WriteLine "What is your name: "
name = Wscript.StdIn.ReadLine
然后我向用户询问五个数字。
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)
并使用ArrayList将五个提示数字放入任何数组
Set myArrayList = CreateObject( "System.Collections.ArrayList" )
myArrayList.Add num1
myArrayList.Add num2
myArrayList.Add num3
myArrayList.Add num4
myArrayList.Add num5
name
如果我在我设置的字典中添加一个键。
myDict.Add name
我可以在我之前设置的字典中添加myArrayList
一个值吗?name
myDict
myArrayList
如果是这样,如果我要循环五个数字问题,我该如何追加或添加?