..
Formatting YourOutput | 59 |
at line 20, a (VT) (or vertical tab) will move you to line 20 whether you start from line 5 or line 19.
The default vertical tab settings are every six lines. If you send a CHR$(ll), which is the ASCII code for (VT), before we have set up tabs it will advance the paper to one of these preset tabs. Enter this program to see how this works.
NEW
2plLPRINTCHRfJ(1."FIRST1)TAB" 3@ LPRINTCHR$(ll)"SECONDTAB" 40 LPRINTCHR$(ll)"THIRDTAB" 50 LPRINTCHR$(ll)"FOURTHTAB"
The CHR$(ll) in each line advances the paper to the next vertical tab. The lines should be spaced evenly, six lines apart.
Now let’s set some vertical tabs of our own. Add this line to the program:
10 LPRINTCHR$(27)"P" CHR$(l@ CHR$(Z@)CHR$(@)
CHR$(50) CHR$(PI);
(ESC) “P” is the command to set vertical tabs. Like the hori- zontal tab setting command, tab positions must be defined in ascending order. Our example sets vertical tabs at lines 10,20,40 and 50. Then the CHR$(ll) in each of the following lines advances the paper to the next vertical tab. Figure
Add one more line to the program to demonstrate one more feature of vertical tabs.
60 LPRINTCHR$(ll)"FIFTHTAB"
Now when you run the program the first page looks just like before, but line 60 sends one more (VT) than there are tabs. This doesn’t confuse