Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.1 - Português

Change language to:
English - Français - 日本語 - Русский

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

Ajuda Scilab >> Funções > funcprot

funcprot

alterna o modo de proteção de funções Scilab

Seqüência de Chamamento

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

Parâmetros

prot

inteiro com valores possíveis 0,1 ou 2

Descrição

Funções Scilab são variáveis, funcprot permite especificar o que o Scilab faz quando tais variáveis são redefinidas.

  • Se prot==0 nada especial é feito

  • Se prot==1 o scilab exibe uma mensagem de aviso quando a função é redefinida (modo padrão)

  • Se prot==2 o scilab exibe uma mensagem de erro quando a função é redefinida

Exemplos

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 Funções 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 Apr 02 17:37:06 CEST 2013