Expression

An Expression object holds an expression string. You can check the validity of the expression string or you can evaluate the expression string to obtain the result of the expression.

The Expression object provides the same functionality as the PropertyObject.EvaluateEx , Engine.CheckExpression , and Engine.CheckExprSyntax methods. However, if you are repeatedly evaluating the same expression, it is more efficient to use an Expression object because it only parses the expression string when you first evaluate the expression. Because the Expression object retains the parsed form of the expression, it does not re-parse the expression when you reevaluate the same string.

The Expression object also provides the NumTokens property and the Tokenize and GetToken methods, which you can use to identify the operators, identifiers, and constants that comprise an expression. The capability to parse the expression into component tokens is useful for specialized purposes, such as implementing expression syntax coloring. Because TestStand provides an ActiveX Expression control that features syntax coloring, you typically do not need to identify the tokens in an expression.

Properties

Methods

See Also

Engine.CheckExpression

Engine.CheckExprSyntax

Expression.GetToken

Expression.NumTokens

Expression.Tokenize

PropertyObject.EvaluateEx