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”;
40 LPRINT CHR$(27);“$“;CHR$(I);CHR$o;
50 LPRINT “Horizontal tab.
60 NEXT I
70 END
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
50 LPRINT “Horizontal”;
60 LPRINT CHRE(27) ;“\“;CHR$(I*lO) ;CHR$
70 LPRINT “Tab.
80 NEXT I
90 END
0) ;
0);