Star Micronics NX-15 user manual When you run the program now it produces this

Models: NX-15

1 210
Download 210 pages 57.72 Kb
Page 76
Image 76
When you run the program now it produces this:

68

15LPRINT 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 tabs to every eight col- umns.,

Table

5-7

Horizontal tab commands

Function

Control code

Advancetonexttabposition .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.

Page 76
Image 76
Star Micronics NX-15 user manual When you run the program now it produces this