[Scilab-users] printf bug?

Leon Bevc lebevc at gmail.com
Tue Jul 29 19:41:58 CEST 2014


Strange...

In this case I got the same result as you on Xubuntu and openSUSE:

[ xUbuntu 14.04.1 - 32bit / Scilab 5.5.0 / LANG=sl_SI.UTF-8 ]
lebevc at book-PC:~$ printf "%0.2f\n" 3.1416
bash: printf: 3.1416: neveljavno število
0,00
lebevc at book-PC:~$ printf "%0.2f\n" 3,1416
3,14

----------------------------------------------------------------------
[ openSUSE 13.1-64bit ; Scilab 5.4.1]
lebevc at linux-xkf0:~> printf "%0.2f\n" 3.1416
bash: printf: 3.1416: invalid number
0,00
lebevc at linux-xkf0:~> printf "%0.2f\n" 3,1416
3,14

-->x = 0.6231166;
-->xstr = msprintf("%0.2f", x)
 xstr  =
 0.62
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20140729/e72f7399/attachment.htm>


More information about the users mailing list