[Top][All Lists]

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

[Octave-bug-tracker] [bug #46891] inputname fails in OO @classfile

From: Oliver Heimlich
Subject: [Octave-bug-tracker] [bug #46891] inputname fails in OO @classfile
Date: Thu, 14 Jan 2016 06:52:36 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.5.0

Follow-up Comment #1, bug #46891 (project octave):

According to the help of inputname it is intended that it returns an empty
string.  Also the display method should not display the inputname and an equal
sign if inputname returns an empty string.

For comparison:
s = struct ("a", 1, "b", 2);
display (s.a)
     1    <-- see, no inputname printed

So the problem here is in the @FIRfilter/display.m method, which should itself
do (again causing the same problem one level higher)
fprintf ("%s.polynomial = %s", inputname (1));

In general it is impossible to implement a correct display method in an
m-file, because you do not have access to the current level of indentation
(which you will need when the object is displayed in a struct or cell array).
The best that I could come up with is this:
(it works for cell arrays on the first level of indentation)

Finding this kind of regressions is very simple using the doctest package. It
is still on my to-do list to migrate its functionality into the `test`
function in Octave core.


Reply to this item at:


  Nachricht gesendet von/durch Savannah

reply via email to

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