Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.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 help >> Functions > funcprot

funcprot

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

呼出し手順

funcprot(prot)
previousprot = funcprot(prot)
prot = funcprot()

パラメータ

prot

整数で,指定可能な値は 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)
Report an issue
<< fun2string 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:
Mon Oct 01 17:40:38 CEST 2012