调用子时不能使用括号 - VBScript [英] Can't Use Parentheses When Calling a Sub - VBScript

查看:25
本文介绍了调用子时不能使用括号 - VBScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用 VBScript 编写这段代码,我以前从未使用过.

I'm writing this code in VBScript, which I haven't used before in my life.

我是这样写的:Replace (strContent, st, arr (k,i), 1)

I wrote this: Replace (strContent, st, arr (k,i), 1)

它给了我一个调用子程序时不能使用括号"的问题.任何人都可以帮忙吗?

And it gives me a "Can't Use Parentheses When Calling a Sub" problem. Can anyone please help?

我尝试过在线搜索,但没有任何帮助.

I've tried searching online but nothing helped.

谢谢!

推荐答案

感谢 Panayot Karabakalov 找到答案.

Found the answer thanks to Panayot Karabakalov.

我们尝试使用 Call 并且不带括号:

We tried using a Call and doing it without parentheses:

Replace strContent, st, arr (k,i), 1

但是没有任何效果.最终的解决方案是:

But nothing worked. The solution eventually was:

strContent = Replace (strContent, st, arr (k,i), 1)

感谢大家快速而有帮助的回复!你们永远不会让我们失望.

Thank you everyone for the quick and helpful responses! You guys never let us down.

这篇关于调用子时不能使用括号 - VBScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆