gpt4 book ai didi

vbscript - 在 VBscript 中调用函数时使用 Call 有什么优点吗?

转载 作者:行者123 更新时间:2023-12-02 21:37:50 26 4
gpt4 key购买 nike

如果答案很明显,请原谅我,因为我已经很长时间没有编写 vbscript 了。

在 vbscript 中调用函数时使用 Call 有什么优点吗?

例如:

SomeFunction param1, param2

对比

Call SomeFunction (param1, param2)

最佳答案

差异如 MSDN -

To call a Sub procedure from another procedure, type the name of the procedure along with values for any required arguments, each separated by a comma. The Call statement is not required, but if you do use it, you must enclose any arguments in parentheses.

The following example shows two calls to the MyProc procedure. One uses the Call statement in the code; the other doesn't. Both do exactly the same thing.

Call MyProc(firstarg, secondarg)
MyProc firstarg, secondarg

Notice that the parentheses are omitted in the call when the Call statement isn't used.

关于vbscript - 在 VBscript 中调用函数时使用 Call 有什么优点吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/567341/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com