Posted 01 April 2013 - 08:01 PM
I have a program that stores a number in a file for later display. The text file contains only this number.
When the program reads the number and displays it on screen, it displays just fine - i.e 54. But if I send the exact same variable to a printer, it gets displayed as 54.0. I have tried to tostring() it and math.floor() it, but it displays exactly the same.
Is there a way to configure a display/printout to use only the integer part of a number? It's odd to see a decimal point in uses where only integers make sense.
When the program reads the number and displays it on screen, it displays just fine - i.e 54. But if I send the exact same variable to a printer, it gets displayed as 54.0. I have tried to tostring() it and math.floor() it, but it displays exactly the same.
Is there a way to configure a display/printout to use only the integer part of a number? It's odd to see a decimal point in uses where only integers make sense.