,.
55
The aboslute 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 (meaured from the left margin) is
specified by the values of $21 and n2 in l/60-inch units using the
formula nl + n2 x 256.
Try this program to see how this works.
10 1 Demo of absolute horizontal tabs
20 FOR I=60 TO 70 STEP 2
30 LPRINT I;'+++++';
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 form 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’in l/120-inch units.
Try this program to see how this works.
10 FOR I=1 TO 3
20 LPRINT "Relative";
30 LPRINT CHR$(27>;'\';CHR$(I*2O);CHR$(O);
40 LPRINT 'Horizontal";
50 LPRINT CHR$(27);"\';CHR$(I*lO);CHR$(O);
60 LPRINT "Tab."
70 NEXT I