switch scilab functions protection mode
funcprot(prot)
previousprot = funcprot(prot)
prot = funcprot()
:prot integer with possible values 0, 1, 2 : :previousprot integer with possible values 0, 1, 2 returns previous
value
:
Scilab functions are variable, funcprot allows the user to specify what scilab do when such variables are redefined.
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)
Version Description 5.4.0 Previous value is returned as output argument when setting a new value.