66
Table
Function | Control cde |
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
-
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
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