Star Micronics Radix User Manual page 104

Table of Contents

Advertisement

90
Radix User's Manual
Using Horizontal Tabs
When you turn Radix on there are horizontal tabs set auto-
matically every ten spaces. If you start counting at column 1 they
are at columns
10,
20,
30, 40,
etc. It's easy to use these tabs; you
just send a CHR$(S) to Radix and the print head will move to the
next tab position. CHR$(S) is the ASCII code (HT) for horizontal
tab.
Try this one line program to demonstrate the use of the
default horizontal tabs.
10 'Tabs demo.
20 LPRINT 'lone"
CHR$(9)
?wo" CHR$(9) Vhreel' CHR$(9)
"four"
--
Here's what will print:
one
two
three
four
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
Radix. We can "outsmart" these computers by adding 128 to the
ASCII value that we use. Instead of using CHR$(S), use CHIQ(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:
15
LPRINT CHR$(27) 'D"
CHR$(8) CHFw16)
CHR$(~~) cfw0)
(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-
_
.-

Advertisement

Table of Contents
loading

Table of Contents