JCL TEvaluator Usage

I am using the JCL TCompiledEvaluator (unit JclExprEval) but am having great difficulty trying to add a user function. I want to add a function of type TUnary32Func (1 parameter) but I cannot figure this out. Unfortunately, I cannot find any JCL documentation on this and the Google Ai assistant presents a number of conflicting and possibly bogus solutions.

The procedure call looks like this but I don’t know how to go any further successfully.

public procedure AddFunc(const AName: string; AFunc: TUnary32Func); overload;

Is there a working example anywhere?

Thanks, Gerard Hook

Hi Gerard

I don’t have an answer for you but have you considered DelphiWebScript.

Regards
Graeme

Thanks Graeme.

I will have a look.

Regards, Gerard Hook

You could look at your $(BDSCatalogRepository)\JEDICodeLibraryJCL-13\2025.10\examples\common\expreval\ExprEvalExample.dproj, it gives use cases of
procedure TEasyEvaluator.AddFunc(const AName: string; AFunc: TUnary80Func);