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
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
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