Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - Português


where

retorna a árvore de chamamento de instruções corrente

Seqüência de Chamamento

[linenum, mac] = where()

Parâmetros

linenum

vetor coluna de inteiros

mac

vetor coluna de strings

Descrição

Retorna linenum e mac tais que a instrução corrente foi chamada pela linha linenum(1) da função mac(1), mac(1) foi chamada pela linha linenum(2) da função mac(2), e assim por diante.

mac(i) é, em geral o nome de uma função, mas também pode ser "exec" ou "execstr" se a instrução reside em um arquivo executável ou em uma instrução execstr.

Exemplo

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  !
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 Mar 27 09:49:51 GMT 2023