<< if then else Control flow resume >>

Scilab Help >> Scilab > Control flow > pause

pause

は実行中の実行を一時的に一時停止し、コンソールでの指示を許可します

呼出し手順

pause

説明

pauseモードに切り替えます; 関数のコードに挿入すると,pauseは関数の実行を中断し, pauseのレベル (例: -1->)を 示すプロンプト記号が表示がされます. この時,ユーザは新しいワークスペースにおり, より低いレベルの変数(特にその関数内の全ての変数)が全て利用可能となっています 意図的に変更できます.

To resume the execution, enter resume.

このモードはコマンド abortにより破棄することができます.

pause はデバッグの際に非常に有用です.

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.

参照

履歴

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 then else Control flow resume >>