We can save a tlist with undefined fields
Reported by Michael BAUDIN
Originally assigned to Paul BIGNIER
In the following script, I define a tlist with fields a, b and c. I initialize the fields a and c, but *not* the field b, which is left undefined.
The first error is that I can save the variable smoothly, even if b is undefined. The second error is that the variable cannot be loaded back.
newobj = tlist(["MYTYPE"
"a"
"b"
"c"
]);
newobj.a = %t;
newobj.c = 0.05;
save('pb.dat',newobj);
clear
load('pb.dat');
typeof(newobj)
The previous script produces the following output:
-->typeof(newobj)
!--error 4
Undefined variable: newobj
This caused the bug http://bugzilla.scilab.org/show_bug.cgi?id=7093.