// l(x) = [] when l is not defined => create l = []
pOut = Double::Empty();
}
- else if (_pInsert->isDouble() && _pInsert->getAs<Double>()->isEmpty() && _pVar->isStruct() == false && _pVar->isList() == false)
+ else if (_pInsert->isDouble() && _pInsert->getAs<Double>()->isEmpty() && _pVar->isList() == false)
{
//insert [] so deletion except for Struct and List which can insert []
InternalType::ScilabType varType = _pVar->getType();
}
case InternalType::ScilabStruct :
{
- pOut = _pVar->getAs<Struct>()->insert(_pArgs, _pInsert);
+ pOut = _pVar->getAs<Struct>()->remove(_pArgs);
break;
}
case InternalType::ScilabHandle :
// <-- Short Description -->
// Wrong error message when ticks locations and labels have not the same sizes
clf(); plot2d(); a=gca();
-errmsg1=msprintf(_("%s: Incompatible sizes for properties ''%s'' and ''%s'': Same sizes expected.\n"), "generic_i_h", "x_ticks.locations", "x_ticks.labels");
+errmsg1=msprintf(_("Ticks location and label vectors must have the same size.\n"));
execstr("a.x_ticks.locations=0:2:6","errcatch"); //assert_checkerror does not catch the error here
assert_checkequal(lasterror(), errmsg1);
execstr("a.x_ticks.labels=string([0:2:6])", "errcatch");
assert_checkequal(lasterror(), errmsg1);
-errmsg2=msprintf(_("%s: Incompatible sizes for properties ''%s'' and ''%s'': Same sizes expected.\n"), "generic_i_h", "y_ticks.locations", "y_ticks.labels");
execstr("a.y_ticks.locations=-2:1:2", "errcatch");
-assert_checkequal(lasterror(), errmsg2);
+assert_checkequal(lasterror(), errmsg1);
execstr("a.y_ticks.labels=string([-2:1:2])", "errcatch");
-assert_checkequal(lasterror(), errmsg2);
+assert_checkequal(lasterror(), errmsg1);
close
// Wrong error message when ticks locations and labels have not the same sizes
clf(); plot2d(); a=gca();
-errmsg1=msprintf(_("%s: Incompatible sizes for properties ''%s'' and ''%s'': Same sizes expected.\n"), "generic_i_h", "x_ticks.locations", "x_ticks.labels");
+errmsg1=msprintf(_("Ticks location and label vectors must have the same size.\n"));
execstr("a.x_ticks.locations=0:2:6","errcatch"); //assert_checkerror does not catch the error here
assert_checkequal(lasterror(), errmsg1);
execstr("a.x_ticks.labels=string([0:2:6])", "errcatch");
assert_checkequal(lasterror(), errmsg1);
-
-errmsg2=msprintf(_("%s: Incompatible sizes for properties ''%s'' and ''%s'': Same sizes expected.\n"), "generic_i_h", "y_ticks.locations", "y_ticks.labels");
execstr("a.y_ticks.locations=-2:1:2", "errcatch");
-assert_checkequal(lasterror(), errmsg2);
+assert_checkequal(lasterror(), errmsg1);
execstr("a.y_ticks.labels=string([-2:1:2])", "errcatch");
-assert_checkequal(lasterror(), errmsg2);
+assert_checkequal(lasterror(), errmsg1);
close
// <-- CLI SHELL MODE -->
//
// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id= 7042
+// http://bugzilla.scilab.org/show_bug.cgi?id=7042
//
// <-- Short Description -->
// insertion of an empty matrix into a struct (to remove a row or column)
// is buggy when multiple index is used
-d11=struct('day',25,'month' ,'DEC','year',2006);
-d12=struct('day',2,'month' ,'DEC','year',2006);
-d21=struct('day',8,'month' ,'Feb','year',2010);
-d22=struct('day',12,'month' ,'Feb','year',2010);
+d11=struct("day",25,"month" ,"DEC","year",2006);
+d12=struct("day",2,"month" ,"DEC","year",2006);
+d21=struct("day",8,"month" ,"Feb","year",2010);
+d22=struct("day",12,"month" ,"Feb","year",2010);
d=[d11 d12;d21 d22];
dd=d;
dd(1,:)=[];
// <-- CLI SHELL MODE -->
//
// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id= 7042
+// http://bugzilla.scilab.org/show_bug.cgi?id=7042
//
// <-- Short Description -->
// insertion of an empty matrix into a struct (to remove a row or column)
// is buggy when multiple index is used
-d11=struct('day',25,'month' ,'DEC','year',2006);
-d12=struct('day',2,'month' ,'DEC','year',2006);
-d21=struct('day',8,'month' ,'Feb','year',2010);
-d22=struct('day',12,'month' ,'Feb','year',2010);
+d11=struct("day",25,"month" ,"DEC","year",2006);
+d12=struct("day",2,"month" ,"DEC","year",2006);
+d21=struct("day",8,"month" ,"Feb","year",2010);
+d22=struct("day",12,"month" ,"Feb","year",2010);
d=[d11 d12;d21 d22];