カレントの命令の呼び出しツリーを得る
[linenum, callername] = where()
整数の列ベクトル
文字列の列ベクトル
[linenum, callername] = where()は,
linenumおよび callername を返します.
この際,関数 callername(1) の linenum(1) 行目で
カレントの命令がコールされ,
関数 callername(2)の linenum(2) 行目で
callername(1)がコールされ,...,
を意味します.
callername(i) は一般には関数名ですが,
命令が exec ファイルまたは execstr
命令の中にある場合には,
"exec" または "execstr" となる可能性もあります.
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 !