54
in ascending order. Our example sets vertical tabs at lines 10,
15,25 and 30. Then the CHR$(ll) in each of the following lines
advances the paper to the next vertical tab.
Add one more line to the program to demonstrate one more
feature of vertical tabs.
80 LPRINT CHR$(ll);"FIFTH TAB."
Now when you run the program the first page looks just like
before, but line 80 sends one more (VT) than there are tabs.
This doesn’t confuse the printer - it advances the paper to the
next tab position, which happens to be the first tab position on
the next page.
--
There’s a one-time vertical tab command that works just like
the one-time horizontal tab command. Try this program to see
how these commands work.
10 ' Demo of print positions
20 LPRINT I'* 1st Line, 1st Column."
30 LPRINT CHR$(27);"fl";CHP,$(3);
40 LPRINT 'I* 5th Line, 1st Column."
50 LPRINT CHR$(27);"fO";CHR$(7);
60 LPRINT rl* 6th Line, 7th Column."
70 LPRINT CHR$(27);"fl";CHR$(2);
80 LPRINT CHR$(~~);"~O";CHR$(~);
90 LPRINT "* 9th Line, 5th Column."
100 END
In this program, line 30 sends a one-time vertical tab with
(ESC) “f” 1 command. Line 50 sends a one-time horizontal tab
with (ESC) “f” 0 command. Finally, line 70 and line 80 send
one-time vertical tab and one-time horizontal tab, so the line 90
prints text at the specified position.