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: Nicholas Jankowski
Subject: Re: Why does Octave ignore additional input arguments ?
Date: Mon, 8 Feb 2016 18:46:00 -0500


On Feb 8, 2016 4:38 PM, "Julien Bect" <address@hidden> wrote:
>
> Le 08/02/2016 21:57, Olaf Till a écrit :
>>
>> 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.
>
>
> Thanks for the link, Olaf. I assumed this would have been discussed but I had failed to find the relevant thread.
>
> I have to confess that I'm not really convinced by the reasons given to keep the current behaviour...
>
> But this has already been discussed, so let's leave things as they are.
>
> @++
> Julien
>
>
>

I think I remember the thought process being something like: what works in MATLAB produce the same output in Octave, but some things that work in Octave might not work in MATLAB, and that's ok when it is useful. And although it might be considered sloppy, some people have made use of that feature.

Nick j.


reply via email to

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