Need Help for scripted functions in PascalScript

I can’t execute scripted functions like it is described in the page :
I got a pointer nil in the line : Meth := TTestFunction(ce.GetProcMethod(‘TESTFUNCTION’));
Can you send me a complete sample project of this feature so I can understand please ?
Thank you.

I don’t have a sample handy but one of our testcases uses this api:

TTestMethod = function (s: string): string of object;

procedure TCompilerTestFunctions.CallScriptFunctionAsMethod;
Meth: TTestMethod;
Compile('function Test(s:string): string; begin Result := '‘Test Results: ‘’+s;end; begin end.’);
Meth := TTestMethod(CompExec.GetProcMethod(‘Test’));
Check(@Meth <> nil, ‘Unable to find function’);
CheckEquals(‘Test Results: INDATA’, Meth(‘INDATA’));

In dunit\CompilerTestFunctions.pas in the source repository.