Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TValueRec *DefineVariable(const DewString &AVarName); | Defines new variable. |
| 2 | TValueRec *DefineVariable(const DewString &AVarName, TValueRec *aVar); | Defines new variable of arbitrary type. |
Overload 1: TValueRec *DefineVariable(const DewString &AVarName);
Defines new variable.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AVarName | const DewString & | Defines variable name. Type of variable (double/complex/vector/matrix) must be defined before any Evaluate method will be called. If variable with name AVarName was already defined, it will be redefined and all expressions which contain the symbol AVarName will be recompiled before the next evaluation. |
See Also: TMtxExpression::Undefine, TMtxExpression::VarByName, TMtxExpression::GetVarList, TMtxExpression::DefineDouble, TMtxExpression::DefineComplex, TMtxExpression::DefineVector, TMtxExpression::DefineMatrix, TMtxExpression::DefineFunction, TMtxExpression::DefineVaryingFunction, TMtxExpression::DefineOperator, TMtxExpression::DefineDoubleConstant, TMtxExpression::DefineComplexConstant
Declared in Dew::Math::TMtxExpression · Dew.Math/MtxParseExpr.h · Cross-compiler
Overload 2: TValueRec *DefineVariable(const DewString &AVarName, TValueRec *aVar);
Defines new variable of arbitrary type.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AVarName | const DewString & | |
| 2 | aVar | TValueRec * |
Remarks:
Use this method to define Global variables, which are shared between multiple expression objects. aVar can be constructed externally and then passed to multiple TMtxExpression objects. The name of the variable can be equal or different between TMtxExpression objects, but the value will be modified concurrently and be the same in all. This value is stored in the aVar object. The type does not need to be defined upfront, but once defined an attempt for the script to change the type will be blocked. The type can be reset to undefined with a call to aVar.Undefine.
Declared in Dew::Math::TMtxExpression · Dew.Math/MtxParseExpr.h · Cross-compiler