A> SPECIAL SCREEN EFFECTS
DESCRIPTION
You have probably noticed how LocoScript manages to underline characters on screen and display text in reverse video, and you might wonder how this is achieved. With a bit of cleverness, you can add some life to your dull text screens this way.
To underline text, print (using PRINT) the characters CHR$(27)"r" before displaying it, and then CHR$(27)"u" to disable underlining.
Similarly, for reverse video, print (PRINT) CHR$(27)"p" at the beginning and CHR$(27)"q" afterwards.
As a final touch, the command PRINT CHR$(7) makes the PCW emit a beep. A good idea is to place a "beep" command just before an INPUT statement, to remind users that they are expected to type something.
SOURCE CODE
10 PRINT CHR$(27)"r" 20 PRINT"This text appears underlined" 30 PRINT CHR$(27)"u" 40 PRINT CHR$(27)"p" 50 PRINT"And this text is shown in reverse video" 60 PRINT CHR$(27)"q"
DIGITAL FILE