74

The absolute horizontal tab command moves the print head to a specified position on the page. The positon that you want the print head to move to (measured from the left margin) is specified by the values of nl and n2 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 ; “ttttt”;

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.

The relative horizontal tab command can move the print head right from the current position. The formula for calcu- lating how much the print head moves is the same as in the

absolute horizontal tab command. However, the print head actually moves in l/120-inch units.

Try this program to see how this works.

10 ’ Demo of relative horizontal tabs

20 FOR I=1 TO 3

30 LPRINT “Relative”;

40 LPRINT CHR5(27) ;“\“;CHR$(I*20);CHR5 0) ;

50 LPRINT “Horizontal”;

60LPRINT CHRE(27) ;“\“;CHR$(I*lO) ;CHR$ 0);

70 LPRINT “Tab. ”

80NEXT I

90END

Page 80
Image 80
Star Micronics NR-10, NR-15 user manual Next