view test/ctor-vs-method/__trace__.m @ 30244:4fe897f5db8e

print_usage.m: Fix error on invalid texinfo (bug #61363). * scripts/help/print_usage.m (get_usage_texinfo): Do not call __makeinfo__ if help string doesn't contain a @def* macro.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 21 Oct 2021 16:42:38 +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