help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get function arguments number


From: Jaroslav Hajek
Subject: Re: Get function arguments number
Date: Sun, 2 Jan 2011 11:13:23 +0100

On Thu, Dec 30, 2010 at 6:46 PM, gianvito <address@hidden> wrote:
>
> Hi all,
> I'm writing C++ code...I pass a function and get it using
>
> octave_function func = args(0).function_value();
>

Don't do this unless you really want, because this will ignore
function overloads. If you want to call the function, you should
simply do:
octave_value_list args = ....//prepare arguments
octave_value_list retval = args(0).do_multi_index_op(nargout, args);

> now...is possible to know how many arguments does that function take in
> input? I searched for some function but haven't found anything...
>
> Thanks

args.length()


reply via email to

[Prev in Thread] Current Thread [Next in Thread]