octave-maintainers
[Top][All Lists]
Advanced

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

Re: Why does Octave ignore additional input arguments ?


From: Olaf Till
Subject: Re: Why does Octave ignore additional input arguments ?
Date: Mon, 8 Feb 2016 21:57:33 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Feb 08, 2016 at 06:59:27PM +0100, Julien Bect wrote:
> Hello everyone,
> 
> I was wondering whether there is a specific reason why Octave silently
> ignores additional input arguments in a function.
> 
> For instance:
> 
> >> F = @(x) x^2;  F(2, 3)
> ans =  4
> 
> while in Matlab I get a "Too many input arguments" error.
> 
> @++
> Julien

This was discussed in the thread starting with:

http://lists.gnu.org/archive/html/help-octave/2009-08/msg00037.html

Summarizing, this behaviour of Octave might have been introduced
without a strong reason, but it has regarded as to be useful.

As an example, the optim package has functions which call user
functions under certain circumstances with an additional informational
input argument, which users probalbly only rarely need. Matlabs
behaviour would require users to always account for this additional
argument in their function interfaces.

Olaf

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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