The derivative function does not protect against conflicts between user-defined
Reported by Michael BAUDIN
-- Bug description --
The derivative function does not protect against conflicts between user-defined functions and developper-defined variables.
-- Scilab error message --
-->derivative ( f , [1 2]' )
!--error 21
Invalid index.
at line 2 of function f called by :
at line 10 of function %R_ called by :
at line 15 of function %deriv1_ called by :
at line 58 of function derivative called by :
derivative ( f , [1 2]' )
-- How to reproduce the bug --
function y = f ( x )
y = H_form ( x )
endfunction
function y = H_form ( x )
y = x(1)^2 + x(2)^2
endfunction
derivative ( f , [1 2]' )