此VBS文件无效

时间:2017-06-22 01:09:54

标签: vbscript

我一直在互联网上搜索取消,[X]等的返回值,但它不起作用。即使我设置

x = ""
x = " "
x = 0
x = "0"

它们都不起作用!

Function check(x)
    If IsNumeric(x) Then
    ElseIf x = "" Then
        WScript.Quit
    Else
        MsgBox "Your input is not valid!", 0+48, "Error!"
    End If
End Function

MsgBox "Welcome to the Calculator! This is a basic calculator for users to use.", 0+65, "Calculator"

a_main = InputBox("Type in any number from range 2-2!", "Number", "2")
check a_main

n_one = InputBox("Type in any and only computational math!", "1st number", "345")
check n_one

n_two = InputBox("Type in any and only computational math!", "2nd number", "2356")
check n_two

ans = CInt(n_one) + CInt(n_two)

WScript.Echo ans

0 个答案:

没有答案