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: Amro
Subject: [Octave-bug-tracker] [bug #49794] display vs. disp functions
Date: Fri, 9 Dec 2016 19:25:17 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:45.9) Gecko/20100101 Goanna/3.0 Firefox/45.9 PaleMoon/27.0.2

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

I was thinking this:


function display(obj)
    % print name of existing variable
    varname = inputname(1);
    if ~isempty(varname)
        disp([varname ' =']);
    end

    % print value
    try 
        disp(obj);
    catch
        % in case user-defined overload throws
        builtin('disp', obj);
    end
end



    _______________________________________________________

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]