Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Scilab > Debugging > where

where

カレントの命令の呼び出しツリーを得る

呼出し手順

[linenum, callername] = where()

引数

linenum

整数の列ベクトル

callername

文字列の列ベクトル

説明

[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  !

参照

  • whereami — カレントの命令コールツリーを表示
  • recursionlimit — get or set the current or maximal allowed depth of nested calls
  • pause — は実行中の実行を一時的に一時停止し、コンソールでの指示を許可します
Report an issue
<< debug Debugging whereami >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:37:44 CET 2022