Name | (Variant) Name of added variable (case sensitive text) |
---|---|
Value | (Variant) Value of added variable |
The names of added variables can then be used in the expression that is inserted into this object by the SetExpr method. The Eval method then evaluates the expression by filling in the value of the variable in the place of the variable name.
var val;
var oExpr = Pm.CreatePmExpr();
oExpr.SetExpr("a+b");
oExpr.SetVar("a", 3);
oExpr.SetVar("b", 2.5);
val = oExpr.Eval();