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

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

[Octave-bug-tracker] [bug #53886] Unable to shadow the disp buit-in func


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #53886] Unable to shadow the disp buit-in function
Date: Mon, 14 May 2018 18:10:11 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

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

The reasoning for this was to make the 'disp' (and 'fdisp' and 'display')
functions be installed as dispatch methods on all of the builtin Octave types.
That means when you call 'disp' with an argument of type double, Octave finds
the 'disp' method for that type instead of a global untyped 'disp' function.
Same for all builtin fundamental Octave types.

If you call 'disp' without any arguments, it calls your overloaded 'disp'
function.

I have no idea if this is Matlab compatible or not, but this is why the
behavior is now different.

Now in Octave 4.4, if you create a class directory '@double', and install your
disp.m there, your overloaded 'disp' will be called with arguments of type
double. That worked in previous versions of Octave and still works in 4.4.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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