Star Micronics NX-15 Printer User Manual


 
68
15 LPRINT CHR$(27);“D”;CHR$(7);CHR$(14);CHR$(21):
CHR$(O)
(ESC) “D” is the command to begin setting horizontal tabs. It
must be followed by characters representing the positions
where you want the tabs set. In our program we are setting tabs
in columns 7, 14, and 21. The final CHR$(0) 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.
To reset the default tabs, use the following program:
LPRINTCHR$(27); “eO”;CHR$(8)
This command sets the horizontal
umns.,
Table 5-7
tabs to every eight col-
Horizontal tab commands
Function
Control code
Advance
tonexttabposition
.CHR$(9)
Settabsatnl,n2,etc.
(ESC)“D”CHR$(nl)CHR$(nL’).....
CHR$(0)
Set tabs every n columns
(ESC) “e” OCHR$(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 is an easier way.
The solution is called a one-timetab. Table 5-8 show the three
commands.