..

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 5-l is what you get.

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 Delta-it advances the paper to the next tab posi- tion which happens to be the first tab position on the next page. That’s nice, isn’t it?

Page 71
Image 71
Star Micronics Delta user manual LPRINTCHR$27P CHR$l@ CHR$Z@CHR$@