56 | DeltaUser’sManual | - |
|
|
Try this one line program to demonstrate the use of the default horizontal tabs.
NEW
29LPRINT "ONE"CHR$(9)"TWO"CHR$(9)"THREE" CHR$(9) "FOUR"
Here’s what will print:
.-
ONEI-WcjTHREEFOUR
Even though the words are different lengths, they are spaced out evenly by the horizontal tabs.
CHR$(S) is a problem with some computers. Some BASICS convert CHR$(S) to a group of spaces that act like a sort of pseudo- tab. This is fine if the computer and the printer have the same tab settings, but it doesn’t allow us to use our own tab settings on Delta. We can “outsmart” these computers by adding 128 tothe ASCII value that we use. Instead of using CHR$(S), use CHR$(137) for a tab command. Even this trick won’t work for Apple II com- puters, for they use CHR$(S) for something else entirely. Apple users can get some help in Appendix C.
Now add the following line to your program to set different horizontal tabs.
-
-
-
-
-
-
-
-
-
-
1g LPRINTCHR$(27)"D" CHR$(8)CHR$(M) CHRS(24)
CHR$(la)
~-
-
-
(ESC) “D” is the command to begin setting horizontal tabs. It must be followed by characters representing the positions that you want the tabs set. In our program we are setting tabs in col- umns 8,16, and 24. The CHR$(O) at the end ends the string of tabs. In fact, any character that is not greater than the previous one will stop setting tabs. This means that you must put all your tab values in order, from least to greatest, or they won’t all get set. (It also means that a CHR$(l) is just as good as a CHR$(O) for ending a group of tabs; some computers have trouble sending CHR$(O).)
-
-
-