Hello,

Le 19/02/2016 10:36, Pierre-Aimé Agnel a écrit :
Hello,

A flag has been introduced to tackle the A+[] operation
help("oldEmptyBehaviour")
oldEmptyBehaviour("on")
1 + []

oldEmptyBehaviour("off")
1+[]


oldEmptyBehaviour("query")


We kept the warning for both behaviours if users want to migrate "softly".
This is also done to protect the scripts.

Up to Scilab 5.5.2, we had
strcat([],"anything") == "" // as well as
[] + "anything" == ""
The fact that both expressions give the same result is correct, since they mean exactly the same operation.

But with the new behavior of +[], both results become distinct:
strcat([], "anything")  // still returns "" (scilab 6.0-b1) , while
[]+"anything"  // now returns []

This is why *we **could prefer from strcat([]) or strcat([], "anything") now to return [] instead of ""*.
What's your opinion about this?

Moreover, most of string functions processing [] *already* return [] : *convstr([]) => [], string([]) => [], etc*.

If the behavior of strcat([]) is changed, this should not depend on the oldEmptyBehaviour flag.

Best regards

Alain Lamy and Samuel Gougeon

_______________________________________________
dev mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/dev

Reply via email to