Star Micronics NB-15 user manual Absolute horizontal tab Relative horizontal tab

Models: NB-15

1 114
Download 114 pages 4.7 Kb
Page 74
Image 74
Absolute horizontal tab Relative horizontal tab

66

Table 6-7

One-time horzontal tabs

Function

Control cde

One-time horizontal tab of n spaces

Absolute horizontal tab Relative horizontal tab

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

(ESC) “$” CHR$(nl) CHR$(nZ)

(ESC) “\” CHR$(nl) CHR$(nZ:

The first command in Table 6-7 moves the print head n col- umns to the right. It has the same effect as sending n spaces to the printer.

-

The absolute horizontal tab command moves the print head to - a specified position on the page. The position that you want the

print head to move to (measured from the left margin) is specified by the values of nl and nZ in l/60-inch units using the formula nl + n2 X 256.

Try this program to see how this works.

10 ’ Demo of absolute horizontal tabs

20 FOR I=60 TO 70 STEP 2

30 LPRINT I ; “+++tt” ;

40LPRINT CHR$(27);“$“;CHR$(I);CHR$(O);

50LPRINT “Horizontal tab.”

60NEXT I

70END

In this program, the print head is positioned before the “H” in “Horizontal” is printed.

60 +++++ Horizontal tab.

62 +++++ Horizontal tab.

64 +++++ Horizontal tab.

66 +++++ Horizontal tab.

68 +++++ Horizontal tab.

70 +++++ Horizontal tab.

The relative horizontal tab command can move the print head right from the current position. The formula for calculating how much the print head moves is the same as in the absolute horizontal tab command. However, the units by which the print head actually moves vary with the print style you are using. Table 6-8 shows the various options.

Page 74
Image 74
Star Micronics NB-15 user manual Absolute horizontal tab Relative horizontal tab