octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #38555] Strange behaviour of nargout


From: anonymous
Subject: [Octave-bug-tracker] [bug #38555] Strange behaviour of nargout
Date: Wed, 20 Mar 2013 14:13:11 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0

URL:
  <http://savannah.gnu.org/bugs/?38555>

                 Summary: Strange behaviour of nargout
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 20 Mar 2013 02:13:09 PM UTC
                Category: Libraries
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Peter Søndergaard
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.3
        Operating System: GNU/Linux

    _______________________________________________________

Details:

There is an option of nargout to call it with the name of a function, and then
it returns the number of optional output arguments of that function. However,
if that function has not been called before in the current Octave session,
nargout will fail to find the function. 

Steps to reproduce:

In a freshly started Octave, type:


octave:1> nargout("sombrero")
error: nargout: invalid function

-verbatim
Calling the sombrero function and trying again fixes the problem:

octave:1> sombrero
octave:2> nargout("sombrero")
ans =  3



I am using Octave 3.6.3 on x86_64-redhat-linux-gnu

I think this is related to the work discussed here:
http://savannah.gnu.org/bugs/?func=detailitem&item_id=32700

Cheers,
Peter.






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38555>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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