Ekkehard.Horner
Ekkehard.Horner

Reputation: 38745

QTP/VBScript Syntax of constructor call

Not using QTP myself, but trying to answer this question, I desperately need to know, whether this valid VBScript:

Class C
  Function init(x, y)
    Set init = Me
  End Function
 End Class

 Dim o : Set o = New C.init(0, 1)

will cause a syntax error in QTP - or more generally: Does QTP implement its own dialect of VBScript?

Upvotes: 2

Views: 1143

Answers (1)

Motti
Motti

Reputation: 114695

This is valid in QTP too.

QTP uses VBScript as the engine for running tests, there are some extensions on the language that allow using test objects but most of these just look like global functions and objects. As far as I know nothing is removed from VBScript.

The limitations QTP has regarding class types are regarding intellisense and such not execution of the test/script.

Upvotes: 3

Related Questions