31
In this program underline is turned on in line 20 with (ESC)
-“l, and then off in line 40 with (ESC) “-“O. There’s a new
little wrinkle in this program, though. The semicolons at the
end of the first three lines told BASIC that those lines were to
be continued. Therefore, BASIC didn’t send a carriage return
and line feed at the end of those lines. We just did this to il-
lustrate that all these control codes can be used in the middle of
a line. It’s easy to underline or italicize only part of a line.
n Superscripts and subscripts
Your printer can print in two different heights of characters.
The smaller characters are called superscripts and subscripts and
are half the height of normal characters. Superscripts print even
with the tops of regular printing while subscripts print even with
the bottom of regular printing. They are frequently used to
reference footnotes, and in mathematical formulas.
Table 3-4 has the codes for using superscripts and subscripts.
Table 3-4
Superscripts and subscripts commands
Function Control code
Superscript ON (ESC>“S”O
Subscript ON (ESC)“? 1
Super and subscript OFF (ESC)“T”
Try this program to see them work:
10 1 Demo of superscripts and subscripts
20 LPRINT "Look! ";,
30 LPRINT CliR$(27);"SO";
40 LPRINT "SUPERSCRIPTS ";
50 LPRINT CHR$(27);"T";
60 LPRINT "& ";
70 LPRINT CHR$(27);"Sl";
80 LPRINT "SUBSCRIPTS ";
90 LPRINT CHR$(27);"T";
100 LPRINT "on one line."
I i ne .