format("e") with format()(2)<8 now yields an error. format("v",2), format() corrupts the display
@sgougeon)
Reported by Samuel GOUGEON (BUG DESCRIPTION:
----------------
In Scientific notation for decimal numbers, the minimal width allowed is 8.
If it is smaller in "v" simple notation and we switch to "e" notation,
Scilab 5.5.2 silently resets the width to the minimal value 8, and it is nice.
Unfortunately, Scilab 6.0.0-b2 yields an error instead:
5.5.2:
-->format("v",4);
-->format("e")
-->format()
ans =
0.0D+00 8.0D+00
6.0.0-b2:
-->format("e");
-->format(4)
!--error 999
format: Wrong value for input argument #1: Must be in the interval [8, 25].
A message may rather be useful, indeed, but IMO a warning would be better.
Errors should be emitted only when there is no workaround or really wrong things.
BTW, in Scilab 6:
--> format("v",2)
--> f=format()
f =
1. 2.0 D+00
--> size(f)
ans =
1. 2.0 D+00
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
format("v",4)
format("e")
format()
format("v",2) // special width
f = format()