Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - English

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

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

Scilab Help >> Scilab > Debugging > where

where

get current instruction calling tree

Syntax

[linenum, callername] = where()

Arguments

linenum

a column vector of integers

callername

a column vector of strings

Description

[linenum, callername] = where() returns linenum and callername such as current instruction has been called by the linenum(1) line of function callername(1), callername(1) has been called by the linenum(2) line of function callername(2) and so on.

callername(i) is in general the name of a function but it may also be "exec" or "execstr" if instruction lies in an exec file or an execstr instruction.

Examples

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  !

See also

  • whereami — display current instruction calling tree
  • recursionlimit — get or set the current or maximal allowed depth of nested calls
  • pause — pause mode, invoke keyboard
Report an issue
<< debug Debugging whereami >>

Copyright (c) 2022-2024 (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:
Tue Feb 25 08:49:18 CET 2020