PDA

View Full Version : Showing numbers in diffrent ways?



SuB-ZeRo
- 29th July 2005, 14:59
I want to show numbers on LCD different format but i don't know how :(
my problem is for exmpl.
i have number 1889 how can ı show this number on lcd like 1.889 how can i format this like that?In Visual basic programming there was a command like #,### something like that after than number becomes automaticly 1.889 in PBP can we do that?Or something like that?

rhino
- 29th July 2005, 15:57
Look at the DIG math operator and DEC modifier for LCDOUT.
Example from one of Bruce's posts:

LCDOUT DEC ADval DIG 3,".",DEC3 ADval ' 1.889DIG returns a specified digit from a decimal number. (0-4, position 0 is would be "9" in this case and position 3 would be "1"