The function 'isdef' is a alias for 'exists'. But this does not work when you
Reported by Gaspard Lequeux
-- Bug description --
The function 'isdef' is a alias for 'exists'. But this does
not work when you use the optional second argument 'local'
to see if your (also) exists locally in your function. This
is because isdef is an sci file which cals exists and thus
the local environment is that one of isdef and not that one
of your custom local function.
-- Scilab error message --
-- How to reproduce the bug --
Use the following function. According to the documentation,
both elements of the returnargument should be true, but this
is not the case:
function ret = testbug()
gg = 5; // make sure gg does not exist globally
ret(5) = exists('gg','local');
ret(6) = isdef('gg','local');
endfunction