TExprFunc Typedef

Header: Dew.Math/MtxParseClass.h · Cross-compiler

typedef void (*TExprFunc)(TExprRec *);

Function type for custom function definition.

Any custome defined function must be of this type to be used in the expression parser.

Examples

cpp
#include "MtxParseClass.h"
#include "MtxParseExpr.h"

using namespace Dew;
using namespace Dew::Math;

static void _log10x(TExprRec* Param)
{
}

void Example()
{
    TMtxExpression* ep = new TMtxExpression();

    ep->DefineFunction("Log10x", _log10x, 1);
    ep->AddExpr("Log10x(1.2)+3");
    delete ep;
}