Thanks for the reply, however I am still having trouble with it.
function user.s8_1():void;
X_5:int := sql.mvc();
(X_8:bat[:int], X_12:bat[:dbl]) := capi.eval(nil:ptr, false:bit, "{\n#include <math.h>\n size_t j;\n size_t count = arg1.data[0];\n\n i->initialize(i, count);\n d->initialize(d, count);\n for(j = 0; j < count; j++) {\n i->data[j] = j;\n d->data[j] = round(j > 0 ? 42.0 / j : 42.0);\n }\n};", 5);
barrier X_87:bit := language.dataflow();
X_14:bat[:str] := bat.new(nil:str);
X_20:bat[:int] := bat.new(nil:int);
X_18:bat[:int] := bat.new(nil:int);
X_17:bat[:str] := bat.new(nil:str);
X_16:bat[:str] := bat.new(nil:str);
X_21:bat[:str] := bat.append(X_14, ".L2");
X_23:bat[:str] := bat.append(X_16, "i");
X_25:bat[:str] := bat.append(X_17, "int");
X_27:bat[:int] := bat.append(X_18, 32);
X_29:bat[:int] := bat.append(X_20, 0);
X_31:bat[:str] := bat.append(X_21, ".L2");
X_32:bat[:str] := bat.append(X_23, "d");
X_34:bat[:str] := bat.append(X_25, "double");
X_36:bat[:int] := bat.append(X_27, 53);
X_38:bat[:int] := bat.append(X_29, 0);
exit X_87:bit;
sql.resultSet(X_31, X_32, X_34, X_36, X_38, X_8, X_12);
end user.s8_1;
Other related question is regarding output parameters names? In the C code, they are named <i> and <d> and this also throws an undeclared error.
Btw, is there a way to get the UDF definition, i.e., the pointer as expected? I maybe that would be an easier solution?
Renato M.