Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.2 - 日本語

Change language to:
English - Français - Português - Русский

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

Scilabヘルプ >> Scilab > Control flow > resume

resume

リターンまたは復帰実行およびローカル変数をコピー

呼出し手順

resume
[x1,..,xn]=resume(a1,..,an)

引数

x1,..,xn

コール側の環境の変数

a1,..,an

ローカル変数

説明

関数内で resume は関数の実行を中断します.また, [..]=resume(..) は関数の実行を中断, ローカル変数aiをコールした側の環境の 名前xiに代入します.

pause モードの場合, より低いレベルに戻ることができます. [..]=resume(..)はより低いレベルに戻り, ローカル変数aiをコールした側の環境の 名前xiに代入します.

関数によりコールされるexecstrの場合, [..]=resume(..) はその関数の実行を停止し, ローカル変数aiをコールした側の環境の 名前xiに代入します.

resumereturnと等価です.

注意: この機能を使用すると,コードが複雑化する可能性があります. 代わりに, function b=foo()構文が推奨されます.

function foo(a)
         a=a+1
         b=resume(a)
         c=52
endfunction

foo(42);
assert_checkequal(b,43);
// c does not exist
// with several function calls
function foo1()
  a=1;
  b=2;
  c=3;
  [x,y,z]=resume(a, b, c)
endfunction

function foo2()
  foo1()
  x, y, z // Declared
endfunction

foo2()
// x y z does not exist here

参照

  • abort — 評価を中断する.
  • break — ループ中断を表すキーワード
  • pause — 中断モード, キーボード入力を待つ
  • quit — Scilabを終了またはpauseレベルを減らす
  • return — リターンまたは復旧し,ローカルな変数をコピー
  • execstr — 文字列中のScilabコードを実行

履歴

バージョン記述
6.0.0 resume is now protected: Assignments like resume=1 are no longer possible.
Report an issue
<< pause Control flow return >>

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:
Thu Feb 14 15:01:59 CET 2019