Star Micronics NB-15 user manual This command sets the horizontal tab to every eight columns

Models: NB-15

1 114
Download 114 pages 4.7 Kb
Page 73
Image 73

,

.

65

15 LPRINT CHR$(27);“D”;CHR$(7);CHR$(l4);CHR$(21);

CHRS(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:

ONE TWO THREE FOUR

The words are now closer together, but still evenly spaced. To reset the default tabs, use the following program:

LPRINT CHR$(27);“eO”CHR$(8)

This command sets the horizontal tab to every eight columns.

Table

6-6

Horizontal

tab

commands

Function

Control code

Advancetonexttabposition CHR$@)

Settabsatnl,n2,etc.

 

(ESC)“D”CHR$(nl)

CHR$(nZ).....CHR$(O)

 

Settabseveryn columns

 

(ESC) “e”0 CHR$(n)

nOne-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 course there is.

The solution is called a one-time tab. Table 6-7 show the three commands.

Page 73
Image 73
Star Micronics NB-15 user manual This command sets the horizontal tab to every eight columns