-- Bug description --
cell.entries assignation may delete part of the stored content
-- Scilab error message --
-->a=makecell([2,2], -3, [ 'a' 'b' ; 'f' 'gh'], %z, list( -1, "ok" ))
a =
!-3 ["a","b";"f","gh"] !
! !
!z list(-1,"ok") !
-->a(2,2)
ans =
!-1 "ok" !
-->a(2,2)(2)
ans =
"ok"
-->a(2,2)(2)="nok"
!--error 10000
Invalid assignement: for insertion in cell, use e.g. x(i,j).entries=y
at line 3 of function generic_i_ce called by :
at line 3 of function %c_i_ce called by :
a(2,2)(2)="nok"
// OK. Then,
-->a(2,2).entries
ans =
ans(1)
- 1.
ans(2)
ok
-->a(2,2).entries(2)
ans =
ok
-->a(2,2).entries(2)="nok"
a =
!-3 ["a","b";"f","gh"] !
! !
!z -1 !
-->a(2,2).entries(2)
!--error 21
Index invalide.
// The list(-1,"ok") is updated into -1 (constant) instead of into list(-1,"nok") (list)
-- How to reproduce the bug --
a=makecell([2,2], -3, [ 'a' 'b' ; 'f' 'gh'], %z, list( -1, "ok" ))
a(2,2)
a(2,2)(2)
a(2,2)(2)="nok"
a(2,2).entries
a(2,2).entries(2)
a(2,2).entries(2)="nok"
a(2,2).entries(2)
typeof(a(2,2).entries)