octave-maintainers
[Top][All Lists]
Advanced

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

Re: WTF bug ID


From: Philipp Kutin
Subject: Re: WTF bug ID
Date: Sat, 20 Dec 2014 12:53:41 +0100

On Fri, Dec 19, 2014 at 6:31 PM, Rik <address@hidden> wrote:
> I remember being unhappy about having that implemented at the time, but 
> whatever.  I had added a note at the bottom of the docstring for error to try 
> and warn people about this ("two or more input arguments")

While the behavior is somewhat strange, there's a certain logic to it.
Since in the M language, escapes like '\n' have no meaning at the
lexical level and are merely interpreted by sprintf() and the like at
runtime, a mnemonic for error() usage can be that for more than one
inarg, the first one is a format string, and it's plain otherwise. I
think it's a good thing to be compatible to Matlab -- less hassle when
you're writing code targeting both implementations.

--Philipp



reply via email to

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