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

funcprot

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

呼出し手順

prot=funcprot()
funcprot(prot)

パラメータ

prot

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

説明

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

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

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

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

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
<< format Scilab funptr >>

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:
Wed Jan 26 16:25:00 CET 2011