Star Micronics NX-10 Printer User Manual


 
15 LPRINT CHR$(27);"D";CHR$(7);CHR$(l4);CHR$(21);
CHR$(O)
(ESC)“D” is the command to begin setting horizontal tabs. It
must be followed by characters representing the positions that
you want the tabs set. In our program we are setting tabs in col-
umns 7, 14, and 21. The CHR$(O) at the end ends the string of
tabs. In fact, any character that is not greater than the previous
one will stop setting tabs. This means that you must put all your
tab values in order, from least to greatest, or they won’t all get
set.
When you run the program now it produces this:
The words are now closer together, but still evenly spaced.
The words are now closer together, but still evenly spaced.
Turn your printer off and on again to reset the default tabs. Turn your printer off and on again to reset the default tabs.
Table 4-7 Table 4-7
Horizontal tab commands Horizontal tab commands
Function Function
Control code Control code
Advance to next tab position
Advance to next tab position CHWW CHWW
Set tabs at nl, n2, etc. Set tabs at nl, n2, etc.
(ESC)“D”CHR$(nl) (ESC)“D”CHR$(nl)
CHR$(nZ).....CHR$(O) CHR$(nZ).....CHR$(O)
n One-time horizontal tabs
Suppose you need to move to a position across the page, but
you only need to do it once. It doesn’t make much sense to set
up a tab to use only one time. There must be an easier way -
and of cause there is.
The solution is called a one-time tab. Table 4-8 show the com-
mands.
Table 4-8
One-time horizontal tabs
Function
Absolute horizontal tab
Relative horizontal tab
Control code
(ESC) ‘3” CHR$(nl) CHR$(nZ)
(ESC) “\” CHR$(nl) CHR$(nZ: