BUG DESCRIPTION:
----------------
"addfield" functions behaves differently between Scilab versions 5 and 6
ERROR LOG:
----------
(No error)
HOW TO REPRODUCE THE BUG:
-------------------------
> field = "new_field"
> setfield(1,[getfield(1,ml), field], ml)
In Scilab 6.0.0-beta-1, the mlist "ml" is NOT updated. You have to do : ml = setfield(1,[getfield(1,ml), field], ml)"
In Scilab 5.x.x, this mlist IS updated.
OTHER INFORMATION:
------------------
My own function to add a field to mlist :
ver_major = getversion("scilab");
ver_major = ver_major(1);
disp(ver_major, "Scilab major version reconnue : ");
// fonction locale pour ajouter des champs à une mlist
// utilisation : test_ml = addfield(test_ml, "nouveau_champ")
if ver_major <6 then
function y=addfield(ml,field)
setfield(1,[getfield(1,ml), field], ml)
y = ml
endfunction
else
function y=addfield(ml,field)
y = setfield(1,[getfield(1,ml), field], ml);
endfunction
end