本文介绍了如何在VBScript中添加注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些VBScript,我想在代码中添加一些解释。
I have some VBScripts I would like to add some explanation to within the code.
是否有用于添加注释的语法?
Is there some syntax for adding a comment?
推荐答案
如何在VBScript中注释代码?
如有疑问,请查看
下面是使用这两种方法的示例
Below is example using both methods
Rem This is a comment
'This is also a comment
Call SomeFunction(SomeValue) : Rem This is an inline comment
Call SomeFunction(SomeValue) 'This is also an inline comment
没有真正的理由使用 Rem
,它只是。在我看来,撇号方法的效果很好,但不那么令人讨厌,但完全是用户喜好。
There is no real reason to use Rem
it's just a throw back from BASIC. The apostrophe approach works just as well as it is less intrusive in my opinion but it is entirely user preference.
VBScript不支持块注释。每行必须以 Rem
或撇号'
开头。
VBScript does not support block comments. Each line must start with either Rem
or an Apostrophe '
.
- Commenting code in ASP Classic
- Server-side comments: What's the equivalent of <%— --%> in ASP Classic?
适用于,该问题使用
这篇关于如何在VBScript中添加注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!