<< debug Debugging whereami >>

Scilab Help >> Scilab > Debugging > where

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  !

Ver Também


Report an issue
<< debug Debugging whereami >>