TMtxExpression.ClearAll Method

procedure ClearAll;

Clears all expressions and all defined variables.

Result: stored in self (calling object)

Examples
Uses MtxParseExpr, MtxParseClass;

procedure Example(myParser: TMtxExpression);
var eCount: Integer;
begin
    // 1. Example
    myParser.DefineDouble('omega');
    myParser.DefineDoubleConstant('hbar');
    myParser.AddExpr('hbar*omega');

    // 2. Clear everything
    myParser.ClearAll;

    // 3. What happened ?
    eCount := myParser.ExprCount // returns 0
    // Also, all defined the variable, constant varying function, operator,
    // etc.. lists are cleared.

end;
See Also: TMtxExpression.ClearExpressions, TMtxExpression.ClearVariables