
Originally Posted by
Melanie
No tutorial - just program, play and learn from doing.
Assuming you'll never exceed 255 km/h wind speed (byte variable) and you don't live in Louisianna...
My example right-justified... so the maximum you can display is three characters (100-255 km/h).
If your spped is less than 100 km/h, then you prefix with one blank... this covers 10-99 km/h.
If your speed is less than 10km/h, then you need to prefix with two blanks (0-9 km/h).
Using this method, you get a stationary "km/h" label with the digits moving to the left. A lot neater than digits moving to the right with the "km/h" label flapping about behind them.
Bookmarks