[Scilab-Dev] [oldEmptyBehaviour()] displaying a warning message in both Scilab 5 and Scilab 6 behavior

Clément David clement.david at scilab-enterprises.com
Fri Apr 8 12:09:37 CEST 2016


Hello,

(I may not have formulated the current status and my proposal clearly enough)

> > However, the current implementation display a warning in both Scilab 5 enforced and Scilab 6
> > execution mode. I proposed a patchset [1] to remove the warning in the Scilab 6 execution mode
> > but
> > preserve it on the Scilab 5 mode (eg. after a call to oldEmptyBehaviour("on") ).

> I am afraid that i do not catch all what you mean.
> With "Scilab 5 enforced execution mode", do you mean in  Scilab 6 with oldEmptyBehaviour("on")
> mode?
> So, instead of using this mode to still ACCEPT and NOT warn users whether []+a is met, it would
> warn users,
> while in oldEmptyBehaviour("off"), meeting []+a would no longer warn users?

> BTW:
> * The discussion with Eric and other users is not a flame-war. The more i modified my code about
> this feature, 
>    the more i thought that even if "[]+a == a" is not "logical", it is very handy, it does not
> hurt, and it prevents nothing. 
>    Removing it compels to add as many if/then/else.  And what for?

Currently, to remove the warning we have to explicitly write if/then/else code. There is a warning
in add and subtract codes on the *normal execution mode* (whatever it is). In my view, this is
useful to ease porting but a stable Scilab release should not contain a warning in normal execution
mode.

In the source code, a warning is present on :

1. 1+[]
2. 1+[] if oldEmptyBehaviour has been set

I want to remove the 1. warning but this might break without warning existing code non-ported code.
It currently breaks with a warning.

Thanks for asking for clarification,

--
Clément





More information about the dev mailing list