开发者

VB: What is missing in scripting host while it is present in "full" VB?

开发者 https://www.devze.com 2023-03-03 16:31 出处:网络
When programming (scripting) in VB scripting host, how can I learn what is implemented and what not?

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 scriptin开发者_开发问答g 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?


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:

  • VBScript Features not in Visual Basic for Applications
  • Visual Basic for Applications Features Not In VBScript
  • Key Differences Between Visual Basic for Applications and VBScript
  • VBScript Versus Visual Basic and VBA
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号