A routine very similar to mister_e's could easily be used to centre text to the LCD screen.
It's almost funny to see such a request of the language itself.
For a 16 character display, count the length of the message to display, divide that by 2,
and print the message that many spaces to the left of centre (or 8 minus that figure).
If you want to print it all to the right, start from 16 (or length of the LCD screen) minus the length of the message.
To use EEPROM, set a two byte qualifier recognised by your program, then you can count the bytes until
you reach the next qualifier to gain the length of the message.
You only need to use the LCDOUT command once in your whole program to send one single variable byte at a time.
Same with serout, sound, etc. as they can be called from other routines. any more is overkill.
PBP only includes these routines once in your program, no matter how many times you use them.
There's no reason why the programmer should do any different.
Bookmarks