37

It should come out like this:

In this program underline is turned on in line 20 with (ESC)

- ” 1, and then off in line 40 with (ESC) “ -” 0. There’s a new aspect to this program, though. The semicolons at the end of the first three lines told BASIC that those lines were to be con- tinued. Therefore, BASIC didn’t send a carriage return and line feed at the end of those lines. We just did this to illustrate 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.

nSuperscripts 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- ly with the tops of regular printing while subscripts print evenly 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

Try this program to see them work:

10 Demo of superscripts and subscripts

20 LPRINT "Look' "*

30 LPRINT CHR$(;7)I"SO";

40 LPRINT "SUPERSCRIPTS ll;

50 LPRINT CHR$(27);"T";

60 LPRINT "& 'I;

70 LPRINT CHR$(27);"Sl";

80 LPRINT "SUBSCRIPTS ";

Page 33
Image 33
Star Micronics NP-IO manual Try this program to see them work