get current instruction calling tree
[linenum, callername] = where()
a column vector of integers
a column vector of strings
[linenum, callername] = where()
returns linenum
and
callername
such as current instruction has been
called by the linenum(1)
line of function
callername(1)
, callername(1)
has been called by the
linenum(2)
line of function callername(2)
and so on.
callername(i)
is in general the name of a function but it may also be
"exec"
or "execstr"
if instruction lies in an
exec file or an execstr instruction.
function foo() c = 1 [a,b] = where() disp("Line:") disp(a); disp("Function:") disp(b); endfunction function test() function beer() foo() endfunction beer() endfunction test() | ![]() | ![]() |
--> test() Line: 3. 2. 5. Function: !foo ! !beer ! !test !