Now, as you configured it, you need to pass an array of strings, since you have declared the parameter as such. In Delphi itself, which can be done using
MyObj.FnWithVarNumOfArgs(Array("1","2","3"))
To create a dynamic arry with the given values, and then pass it to FnWithVarNumOfArgs.
From a scripting language, the Delphi Array function will certainly not be available and you will need to do something smart with pointers, and I donβt know if it can even be made to work.
Perhaps best to use what is known as the Variant Open Array Parameters.
Using: http://docwiki.embarcadero.com/RADStudio/en/Parameters_(Delphi)#Variant_Open_Array_Parameters
The parameters of an open array allow you to pass an array of differently typed expressions for a single procedure or function. To define a routine with a variant of an open array parameter, specify an array of constants as the type of parameter. In this way,
DoSomething procedure (A: array Const);
announces a procedure called DoSomething that can run heterogeneous arrays.
The const construction array is equivalent to the TVarRec array. TVarRec, declared in the system unit, is a record with a variant part, which may contain integer values, Boolean, character, real, string, pointer, class, class reference, interface and variants. The TVarRec VType field indicates the type of each element in the array. Some types are passed as pointers and not values; in particular, strings are passed as a pointer and must be a typecast for the string.