[Top][All Lists]

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

[Octave-bug-tracker] [bug #57867] strrep: unexpected substitution behavi

From: Mike Miller
Subject: [Octave-bug-tracker] [bug #57867] strrep: unexpected substitution behavior on a char array
Date: Sun, 29 Mar 2020 17:09:08 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36

Follow-up Comment #46, bug #57867 (project octave):

This change doesn't look good to me at all.

First of all, the patch doesn't apply cleanly when applied to the top of the
Octave repository. It would be really helpful if you could learn how to
produce a proper patch or Mercurial exported changeset against the Octave
repository. Can you maybe explain the difficulty you are having working with
Mercurial to produce such a patch?

With some small effort, I was able to apply the patch to the default branch.
However, the changes do not adhere to the GNU or Octave coding styles, for
example mixing tabs and spaces and incorrect indentation.

The new behavior is also very unsatisfactory. You have changed the behavior of
this function so that it returns a cell array always, even when the input is a
normal char row vector. That is not desirable.

Also, I know we are extending Matlab behavior here, so what the function
should do is debatable, but I think it would be wrong to return a cell array
when the input is a char matrix. My intuition is if the input is a char row
vector, the output should be the same. When the input is a cell array, the
output should be the same. So when the input is a char matrix, the output
should probably also be a char matrix, with rows space-padded or truncated as


Reply to this item at:


  Message sent via Savannah

reply via email to

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