vbs数组的使用

mu_Choose = "3"

Dim i, sMethod
if IsNumeric(mu_Choose) Then
    i = CInt(mu_Choose)
    if i < 1 or i > 4 Then
        i = 0
    end if
else
    i = 0
end if

sMethod = Array("hh", "addition", "subtract", "multiply", "division")
'sMethod(0) = "hh"
'sMethod(1) = "addition"
'sMethod(2) = "subtract"
'sMethod(3) = "multiply"
'sMethod(4) = "division"

mu_sMethod = sMethod(i)
MsgBox mu_sMethod
posted on 2011-03-01 22:39  清清飞扬  阅读(1326)  评论(0编辑  收藏  举报