Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語 - Русский
Scilab Help >> Scilab > Control flow > pause


temporarily pauses the running execution, and allows instructions in console.




Switch to the pause mode. Inserted in the code of a function, pause interrupts the execution of the function: one receives a prompt symbol which indicates the level of the pause (e.g. -1->). The user is then in the workspace where the pause occurs, and where all the variables around are accessible and can be changed by hand on purpose.

To resume the execution, enter resume.

Enter abort to definitively stop the execution and return to the main level.

The pause is very useful for debugging purposes.


function c=foo(b)
    a = 42 + b
    disp("Thanks to the pause, you can investigate if ''a'' has the right value");
    disp("Values of local variables can be changed too if required.");
    c = a + 2

a = 3;
--> a = 3;
--> foo(2)
  "Thanks to the pause, you can investigate if 'a' has the right value"
  "Values of local variables can be changed too if required."

Type 'resume' or 'abort' to return to standard level prompt.

-1-> a
 a  =

-1-> a = 0;

-1-> resume
 ans  =

See also

  • debug — enters the Scilab debugger mode
  • halt — stop execution
  • return — return or resume execution and copy some local variables
  • abort — interrupt evaluation.
  • whereami — display current instruction calling tree
  • sleep — suspend all code executions (console, scripts, callbacks,..)
  • quit — Terminates Scilab or decreases the pause level


6.0.0 The new values of local variables changed during a pause are now taken into account when resuming the execution with resume.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:23:19 CET 2022