40 LPRINT CHR$(27) CHR$(69);
‘SELECT EMPHASIZED
50 LPRINT “THIS IS EMPHASIZED PRINTING”
60 LPRINT CHR$(27) CHR$(‘Il);
‘SELECT DOUBLE-STRIKE
70 LPRINT “AND THIS IS BOTH AT ONCE”
80 LPRINT CHR$(27) CHR$(72) CHR$(27) CHR$(70);
‘CANCEL DOUBLE-STRIKE AND EMPHASIZED
90 LPRINT “NOW YOU’RE BACK TO NORMAL PRINTING”
THIS IS DOUBLE-STRIKE PRINTING
THIS IS EMPHASIZED PRINTING
AND THIS IS BOTH AT ONCE
NOW YOU’RE BACK TO NORMAL PRINTING
Figure 6-2. Double-strike and emphasized print in BASIC.
Underlined printing
Underlining is another good way to emphasize a point, or to
highlight sections of text. Try this short program to give you an il-
lustration of underline feature.
NEW
10 LPRINT CHR$(27) CHR$(45) CHR$(l);
‘SELECT UNDERLINE
20 LPRINT “LADIES AND GENTLEMEN, ;
30 LPRINT CHR$(27) CHR$(45) CHR$(O);
‘CANCEL UNDERLINE
40 LPRINT START YOUR ENGINES!”
Your results should look like this:
LADIES AND GENTLEMEN, START YOUR ENGINES!
Figure 6-3. A print sample of underlined text.
In thissample, the underline feature is turned on with thecommand
CHR$(27) CHR$(45) CHR$(l), and turned off with CHR$(27)
CHR$(45) CHR$(O). You’ll notice that we did it all on one line. You
can do this simply by adding-as we did-semicolons at the end of
the appropriate lines. This tells BASIC to continue those lines without
sending a carriage return/line feed at the end of each line.
We did this just to illustrate that most of the printer’s codes can
be used in the middle of a line.
49