Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - Português

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

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

Ajuda do Scilab >> Scilab > Control flow > pause

pause

pausa temporariamente a execução atual e permite instruções no console.

Seqüência de Chamamento

pause

Descrição

Alterna para o modo pause ; inserido no código de uma função, pause interrompe a execução da mesma: recebe-se um símbolo de prompt para indicar o nível de pause (exemplo: -1->). O usuário está agora num novo espaço de trabalho em que todas as variáveis de nível infeiror (em particular todas as variáveis da função) estão disponíveis e podem ser alteradas propositalmente.

Para retomar e continuar a execução, entre resume.

Este modo pode ser cancelado pelo comando abort.

pause é extremamente útil para propósitos de depuramento.

Exemplos

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.

Histórico

VersãoDescrição
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 then else Control flow resume >>

Copyright (c) 2022-2023 (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 Jan 03 14:35:18 CET 2022