Page 1 of 1

decimal numbers

Posted: 12 Jul 2018, 17:33
by SIRX
Hi at all,
I have a problem about the number of digits. By this:

simUI.setLabelText(ui,4013,''..string.format("%.2f",DRWFL,true))

I write only 2 decimal digits as: 0.31 but I need to print 5 decimal digits...
Every advice is welcome.
thanks

Re: decimal numbers

Posted: 13 Jul 2018, 17:39
by coppelia
Hello,

what about writing 5 instead of 2??
Like:

Code: Select all

string.format("%.5f",1/3)
Cheers

Re: decimal numbers

Posted: 13 Jul 2018, 19:51
by SIRX
Hello,
thanks very much