scilab keywords are not protected, statements like abort=1 are executed silently
Reported by adrien vogt-schilb
abort=1;
abort //this will abort
-->whos "-name" ab
Nom Type Dimensions Octets
abort constant 1 par 1 24
this happens with most of the keywords
the most funny one is :
clear = 1
clear clear
PS:
trying to detect which keywords are protected and which not, i have written the following code that test each keyword.
keys = getscilabkeywords();
p=size(keys);
// for j=1:p
thiskeys = keys(2); //keys(p);
for i = 1:size(thiskeys,"*")
if ~execstr(thiskeys(i)+"=1","errcatch")
disp(thiskeys(i))
end
end
// end
unfortunatly execstr does not catch warnings, and keys(2) contains both keywords and functions (as pwd()). functions such as pwd can be redefined, with a warning, this is OK.