definedfields() fails on a list or tlist with undefined components
Reported by Samuel GOUGEON (@sgougeon)
-- Bug description --
definedfields() fails on a tlist with undefined NAMED fields.
-- Scilab error message --
wrong answer:
-->T = tlist(["test" "txt" "real" "bool"],"Hi",,%T)
T =
tlist of type "test" with fields:
txt: "Hi"
real: (undefined)
bool: %t
-->definedfields(T)
ans =
1. 2. 3. 4.
// While (This is a work-around for testing the status of such fields)
-->type(T(3))
ans =
0.
-->type(T.real)
ans =
0.
-- How to reproduce the bug --
T = tlist(["test" "txt" "real" "bool"],"Hi",,%T)
definedfields(T)
type(T.real)