octave-maintainers
[Top][All Lists]
Advanced

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

Re: WTF bug ID


From: Rik
Subject: Re: WTF bug ID
Date: Fri, 19 Dec 2014 09:31:33 -0800

On 12/19/2014 09:00 AM, address@hidden wrote:
Subject:
New Item Group value for bug tracker
From:
"John W. Eaton" <address@hidden>
Date:
12/19/2014 07:27 AM
To:
address@hidden
List-Post:
<mailto:address@hidden>
Content-Transfer-Encoding:
7bit
Precedence:
list
MIME-Version:
1.0
Message-ID:
<address@hidden>
Content-Type:
text/plain; charset=utf-8; format=flowed
Message:
6

While thinking about warning and error IDs, I came across the following Matlab behavior:

Escape sequences like \n and \t are not converted in error messages if a single argument is passed to error, but they are if more than one argument is supplied AND the message ID counts as the second argument, not just the ones that follow as possible values for printf-style % conversions.  Weird.  OK, so I was going to note this in the bug tracker, and I started to think about how crazy this behavior seems to me, so I decided to add a new Item Group value to the tracker:

  WTF, MATLAB?!?  -- Insane Matlab bugs^H^H^H^Hfeatures we'd really prefer not to copy

Then, almost finished with my report, I decided to try this in Octave. Much to my surprise, it appears that we've already copied this behavior.  WTF, Octave?!?

So, anyway, I left the value in the tracker.  Feel free to enjoy using it anytime someone reports some crazy Matlab compatibility issue.

jwe

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")

--Rik

Implementation Note: For compatibility with MATLAB, escape
     sequences (e.g., "\n" => newline) are processed in TEMPLATE
     regardless of whether TEMPLATE has been defined within single
     quotes as long as there are two or more input arguments.  Use a
     second backslash to stop interpolation of the escape sequence
     (e.g., "\\n") or use the `regexptranslate' function.



reply via email to

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