Function 货币转换功能不支持';行不通

Function 货币转换功能不支持';行不通,function,vbscript,Function,Vbscript,我刚刚开始了一段关于VBScript的视频,在完成了一些教程之后,我决定创建一个美元到欧元的转换器。代码如下: Option Explicit Dim inputMoney inputMoney = CDbl(InputBox("Enter in the number of USD:")) MsgBox "The amount of " & inputMoney & " USD in EUR is" & convert_to_eur(inputMoney) MsgBox

我刚刚开始了一段关于VBScript的视频,在完成了一些教程之后,我决定创建一个美元到欧元的转换器。代码如下:

Option Explicit

Dim inputMoney
inputMoney = CDbl(InputBox("Enter in the number of USD:"))
MsgBox "The amount of " & inputMoney & " USD in EUR is" & convert_to_eur(inputMoney)
MsgBox exit_mssg()

Function convert_to_eur(amount)
    amount = amount * 0.88
End Function

Function exit_mssg()
    exit_mssg = "Thank you"
End Function

有人能告诉我哪里出错了吗?

在vbscript中,函数返回一个值,将其赋值给自身

Function convert_to_eur(amount)
    convert_to_eur = amount * 0.88
End Function

@lupo19,嗯,不完全是这样的:您在上一个函数中使用了它。在阅读自己的代码时,我们有时都是盲目的