PDA

View Full Version : LCDOUT help



f6ggy
- 6th October 2003, 00:44
I will want to post the result of a arithmetic operation which is 143012,5 in three variables ex F1 153 - F2 012 - F3 5 - LCDOUT dec3 f1 LCDOUT dec3 f2 LCDOUT "." LCDOUT dec1 f1 How to define the variables and calculation???????
or second solution the result 143012.5 how to put it in variable and to post it (LCDOUT) in entirety?????
thank you

Melanie
- 6th October 2003, 12:51
If variable F1 holds 143 (the thousands), F2 holds 012 (hundreds, tens and units) and F3 holds 5 (Single Decimal) then...

If F1>0 then
LCDOut #F1
If F2<100 then LCDOut "0"
If F2<10 then LCDOut "0"
endif
LCDOut #F2,".",#F3

This will ensure leasing zero's are surpressed, and appropriate zero's inserted (for example 100000.0 where F1=100, F2=0 and F3=0).