
Originally Posted by
reaper0995
if you say this:
VAR = 1
LCDOUT $FE, 1, " ", DEC VAR 'three spaces
you will get on the screen
>___1< but lets say your variable becomes 100, you will get:
>___100< i want to get it to say:
>_100<
so the first digit of the variable is the "setpoint," and if its one or 5 digits long, the first one will always be in the same place. not too big of a deal, but if you want to run 2 or 3 variables on the screen at the same time (and vary from 1 to 100), then it kinda sucks to program that....
This is why i asked
Why not updating only some fields on the LCD?
just clear the specific LCD areas where you need to write to.. then yes you must implement some kind of text justification. For that, you'll need to implement a kind of LEN(YourVar) who return the length of your variable, amount of character.
Think about a simple loop, begin with a variable (says LENof) set to 1. Divide your variable to display by ten.. if the result is still greater increment Lenof variable... loop until your result is still greater than 10. once your done, you know the LENof your variable. Then it's just a matter to use or not REP " "\AmountOfSpace the right way for your text justification.
That's one way.
Last edited by mister_e; - 21st April 2008 at 20:31.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks