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

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ヘルプ >> Functions > funcprot

funcprot

Scilab関数保護モードを切替える

呼出し手順

funcprot(prot)

previousprot = funcprot(prot)

prot = funcprot()

引数

prot

整数で,指定可能な値は 0,1,2となります

previousprot

整数で,指定可能な値は 0,1,2, 前の値を返します

説明

Scilab 関数が変数の場合, funcprot によりこのような変数が再定義された場合の Scilabの動作をユーザが指定することができます.

  • prot==0 の場合, 何も特別なことは行われません

  • prot==1 の場合, 関数が再定義された時に 警告メッセージを出力します (デフォルトのモード).

  • prot==2 の場合,関数が再定義された時に Scilabはエラーを発生します.

previousprot = funcprot(1)
deff('x = foo(a)','x = a;')
deff('x = foo(a)','x = a + 1;')
foo = 33
funcprot(0)
deff('x = foo(a)', 'x = a;')
deff('x = foo(a)', 'x = a + 1;')
foo = 33
funcprot(previousprot)

参照

History

VersionDescription
5.4.0 前の値は,新規値を設定する際に 出力引数として返されます.
Report an issue
<< feval Functions function >>

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:
Tue Feb 25 08:53:30 CET 2020