Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 291
TheBlastOne Avatar asked May 05 '11 09:05

TheBlastOne


People also ask

What are the features of VBScript?

Features of VBScriptIt has a very simple syntax, easy to learn and to implement. Unlike C++ or Java, VBScript is an object-based scripting language and NOT an Object-Oriented Programming language. It uses Component Object Model (COM) in order to access the elements of the environment in which it is executing.

Is VBScript and Visual Basic same?

VBScript is an untyped language. Unlike Visual Basic and Visual Basic for Applications, in which the developer can define the data type of a variable in advance, all variables in VBScript are variants.


1 Answers

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
like image 183
Helen Avatar answered Sep 27 '22 18:09

Helen