octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #49794] display vs. disp functions


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #49794] display vs. disp functions
Date: Wed, 8 Feb 2017 07:15:51 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Follow-up Comment #28, bug #49794 (project octave):

In comment #3 there was told, that Matlabs "display" accepts an undocumented
second input with the printed variable name. I just figured out the hard way,
that Octave 4.3.0+ does the same.


>> display(1,'t')
t =  1


While refactoring inputParser, I noticed that calls like 


>> p = inputParser
error: 'fullname' undefined near line 55 column 33
error: called from
    print_usage at line 55 column 16
    display at line 477 column 9


resulted in an ugly error. After reading this bug report I know why:

Carnë and I never expected display to have this feature, thus long existing
code like in inputParser:


    function display (this)
      if (nargin > 1)
        print_usage ();
      endif
      ...
    endfunction


Does not work any longer. Now some questions how to handle this:

1) Just change to (nargin > 2), that actually works. For me the question is,
does this behavior remain (is it "stable")?
2) Above + add a note to the docstring of display (I hate undocumented
stuff).

About the other issue in print_usage I care in another bug report.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49794>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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