how to add Custom Function

Issue #143 resolved
Former user created an issue

how to add Custom Function

Comments (2)

  1. Axel Kramer repo owner

    You probably mean a Java defined custom function?

    Define your function class CustomFunctionClass derived from the IBuiltInSymbol interface hierarchy.

    At the start of your program (after F#initSmbols()) define a symbol CustomFunction for your function and assign the CustomFunctionClass as "evaluator"

    public final static IBuiltInSymbol CustomFunction= initFinalSymbol(
                Config.PARSER_USE_LOWERCASE_SYMBOLS ? "customfunction" : "CustomFunction");
    
    ...
    CustomFunction.setEvaluator(new CustomFunctionClass ());
    ...
    
  2. Log in to comment