nargin bug not in 1.0?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

nargin bug not in 1.0?

I've been noting the remarks made recently in help-octave about
nargin not being correctly evaluated (i.e. does not give 0 if no
input args).

I'm still using octave 1.0, and thought I'd check it explicitly:

    octave:1> function y=temp(x1,x2)
    > y = nargin;
    > endfunction
    octave:2> temp()
    ans = 0
    octave:3> temp(1)
    ans = 1
    octave:4> temp(1,1)
    ans = 2

So it looks as though the "nargin bug" is not present in 1.0.
Am I right? Is this purely a 1.1 phenomenon?

Best wishes to all,
Ted.                                     ([hidden email])