On 14 September 2012 09:30, Lukas Reichlin <lukas.reichlin.li...@gmail.com> wrote: > Currently, with > > ret1 = testfun (arg1, arg2, arg3) > > nargin is 3 and inputname ranges from 1 to 3. > But with > > ret2 = testfun (args{:}) > > nargin is still 3 but only inputname(1) exists while inputname(2) > and inputname(3) give errors.
But if you're passing a cs-list, the cs-list itself doesn't have the variable names that you want, and inputname is working as documented, returning an empty string. > Therefore I must find an alternative to inputname or an alternative > to nargin which counts input arguments the same way as inputname > does. Do you know how to circumvent this problem? What exactly is your actual problem? nargin still counts arguments, but why do you want to know what the variables are called in the calling function? The calling function doesn't have this information when you use a cs-list. To me this seems like premature closure or an X-Y problem: http://www.perlmonks.org/index.pl?node_id=542341 Can you give broader context in order to be able to give you a better answer? There may be a completely differenty way to solve your broader problem. - Jordi G. H. ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev