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


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
  • sleep — suspend all code executions (console, scripts, callbacks,..)
  • 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.
Report an issue
<< if Control flow resume >>

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:
Thu Oct 24 11:13:05 CEST 2024