iexit.m

来自「Video IO toolbox for matlab. 用directsho」· M 代码 · 共 33 行

M
33
字号
function iexit(varargin)
%IEXIT(...)
%  Decreases the indentation level then calls IPRINTF on the input
%  arguments.  If no input args are used, a message is created using the
%  caller's function or script name.  Useful for debugging/tracing.
%
%  If an unhandled error occurs between calls to ienter and iexit, the
%  indentation level will not be properly reset.  To reset it, type
%     clear all
%
%Example:
%  function d = foo
%  ienter;
%  d = 2+2;
%  iprintf('2+2=%d', d);
%  iexit;

global videoIO_test_indentLevel;
if (isempty(videoIO_test_indentLevel))
  videoIO_test_indentLevel = 0;
end

if (nargin == 0)
  st = dbstack;
  iexit('...%s', st(2).name);
elseif (nargin == 1 && isnumeric(varargin{1}))
  st = dbstack;
  iexit(varargin{1}, '...%s', st(2).name);
else
  videoIO_test_indentLevel = videoIO_test_indentLevel - 1;
  iprintf(varargin{:});
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?