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

pause

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

Syntax

pause

Description

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.

Examples

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.");
    pause
    c = a + 2
endfunction

a = 3;
foo(2)
--> 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  =
   44.

-1-> a = 0;

-1-> resume
 ans  =
   2.

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
  • quit — Terminates Scilab or decreases the pause level

History

VersionDescription
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:
Tue Jul 20 11:10:39 CEST 2021