delegate System.Int32 FunctionProcess(System.Int32[] parameters)
This assumes that your Python implement will only do integer operation. If
you are going to use the delegate for generic holder of arguments, don't
forget to cast
for example:
delegate object FunctionProcess(object[] parametser)
python = @"
def myItems(myParams)
val1 = Int(myParams[1])
val2 = Int(myParams[2])
return val1 + val2
"
You pretty much need to take care of the conversion. I don't think "*params
object[]* "is supported on the hosting DLR because IronPython doesn't
support this construct.
On Tue, Aug 19, 2008 at 4:52 PM, Christian Schmidt <
[EMAIL PROTECTED]> wrote:
> Hi Dody,
>
> thanks for your help.
>
> > delegate object FunctionProcess(object[] params);
>
> I've already tried this one and also
> delegate object FunctionProcess(params object[] p);
>
> > scope.GetVariable<FunctionProcess> ("Process")
>
> But get an ArgumentException ("Invalid type of return expression value at
> 0:0-0:0") here. Any ideas?
>
> > and modify your Python code to deal with the object[] params.
>
> Could you be more specific here?
>
> Thanks,
> Christian
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
--
nomadlife.org
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com