view test/ctor-vs-method/__trace__.m @ 31203:4c2b83516eb7

isequal.m: Run BISTs for Java objects only conditionally (bug #62930). * scripts/general/isequal.m: Run BISTs for Java objects only if Octave was configured with Java support and a Java VM is available at runtime.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 26 Aug 2022 22:30:43 +0200
parents b1283d4c06c2
children
line wrap: on
line source

function r = __trace__ (t)
  persistent history

  if (isempty (history))
    history = {};
  end
  if (nargin == 0)
    if (nargout == 0)
      history = {};
    else
      r = history;
    end
  elseif (nargin == 1);
    history = [history; t];
  else
    error ('incorrect call to __trace__');
  end

end