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

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

[Octave-bug-tracker] [bug #34857] feval() version that takes arbitrary l


From: Patrick Gosling
Subject: [Octave-bug-tracker] [bug #34857] feval() version that takes arbitrary length argument list
Date: Fri, 18 Nov 2011 14:56:14 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

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

                 Summary: feval() version that takes arbitrary length argument
list
                 Project: GNU Octave
            Submitted by: jpmg
            Submitted on: Fri 18 Nov 2011 14:56:13 GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.3
        Operating System: Any

    _______________________________________________________

Details:

When attempting to marshall a call to feval(), it is often the case that the
length of the argument list being presented is not known until run time.  

Currently, the only way I can see of addressing this is to switch with a case
for each plausible number of arguments, but that is clearly very
unsatisfactory.

An enhancement would be to either

a) have a variable-arguments version called perhaps va_feval() or vfeval() or
similar, which would take two arguments - a function handle, and a cell array
containing the arbitrary length argument list to be passed to the called
function.

b) have a special case for feval(), where if it was passed exactly two
arguments and the second argument was a cell array, that it was assumed that
the cell array should be treated as the argument list for the function
called.

The latter is tempting (in terms of avoiding duplicating code within the
octave interpreter), but is not backwards compatible, and breaks compatibility
with matlab.

Implementation in either case is fairly straightforward (I'd be happy to do
the necessary).






    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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