Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.1 - 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 > Control flow > pause

pause

pause mode, invoke keyboard

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 a new workspace in which all the lower-level variables (and in particular all the variable of the function) are available. To return to the calling workspace enter return.

In this mode, [...]=return(...) returns the variables of the argument (...) to the calling workspace with names in the output [...]. Otherwise, the lower-level variables are protected and cannot be modified.

The pause is extremely useful for debugging purposes.

This mode is killed by the command abort.

Examples

function c=foo(b)
a=42+b
disp("Thanks to the pause, you can investigate if ''a'' has the right value");
disp("Value can be changed too if needed.");
pause
c=a+2
endfunction

foo(2)

See also

  • halt — stop execution
  • return — return or resume execution and copy some local variables
  • abort — interrupt evaluation.
  • quit — Terminates Scilab or decreases the pause level
  • whereami — display current instruction calling tree
  • where — get current instruction calling tree
  • sleep — suspend all code executions (console, scripts, callbacks,..)
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:
Mon Feb 12 19:26:46 CET 2018