VB:脚本主机中缺少什么,而它以“完整”形式存在? VB?

发布于 2024-11-05 08:40:09 字数 714 浏览 6 评论 0原文

在 VB 脚本主机中编程(编写脚本)时,如何了解已实现哪些内容、未实现哪些内容?

例如,记录(或:struct 关键字)未实现,但类(或:class 关键字)则未实现。

不允许 Dim as,所有“as”短语也是如此。

您可以在类中创建属性,但也不能“as”任何内容。

您不能从基类继承(“Inherits”关键字未知)。

等等。

我看到脚本主机是一个脚本主机,因此限制其功能可能是有意义的。

然而,我没有看到这些限制以一种可理解的、甚至合乎逻辑的方式记录在某处,从而赋予所有这些意义。目前,我被迫坚持试错工作流程,并在 QTP 在线帮助中单独查找我想到的每个细节(并且我可能会发现我目前忘记的其他细节)。这是微软设计的现实吗,还是我没有抓住重点?

问题出现在 QTP 上,它使用 Windows 脚本宿主作为其脚本语言。当然,我可以查找我正在寻找的每一个细节 - 但是,这些是我的主要问题:

我在哪里可以找到不同语言之间语言差异的详细列表或表格也涵盖脚本主机的各种 VBA 方言(和版本?)?

能否对脚本主机中包含哪些内容以及不包含哪些内容给出(简单的)推理?

When programming (scripting) in VB scripting host, how can I learn what is implemented and what not?

For example, records (or: the structure keyword) are not implemented, but classes (or: the class keyword) isn't.

Dim as <Type> is not allowed, as are all "as" phrases.

You can create properties in classes, but not "as" anything, too.

You cannot inherit from a base class (the "Inherits" keyword is not known).

And so on.

I see the scripting host is a scripting host, so it might make sense to keep its functionality limited.

However, I do not see those limitations documented somewhere in an accessible, or even logcial way, giving all that a meaning. Currently, I am forced to stick to a trial-and-error workflow, plus separate lookups in QTPs online help for every detail I think of (and I might discover others which I forget currently). Is this the reality that Microsoft designed, or am i missing the point?

The question comes up with QTP, which uses Windows scripting host as its scripting language. Sure I can look up each and every detail I am looking for -- but, and these are my main questions:

Where can I find a detailed list, or table, of language differences between the various VBA dialects (and versions?) that covers scripting host as well?

Can one give a (simple) reasoning for what is included in scripting host and what not?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伴我心暖 2024-11-12 08:40:09

MSDN 上的VBScript 语言参考涵盖了所有语句、关键字、函数和其他语言VBScript 的元素。我总是参考它来回忆确切的语法。

MSDN 还提供了 VBScript 与 VBA 与 Visual Basic 的功能比较指南:

VBScript Language Reference on MSDN covers all statements, keywords, functions and other language elements of VBScript. I always refer to it to recollect the exact syntax.

MSDN also has feature comparison guides for VBScript vs. VBA vs. Visual Basic:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文