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

Change language to:
English - Français - 日本語 - Русский

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

Ajuda do Scilab >> 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  !
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:
Thu Feb 14 15:00:33 CET 2019