Unit installation

NEW
10 OPEN6,4
20 PRINT#6,"012345678901234567890"
30 PRINT#6,CHR$(16);
40 PRINT#6,"15 THIS STARTS IN COLUMN 15."
50 CLOSE6
012345678901234567890
THIS STARTS IN COLUMN 15.
The second type of horizontal tab gives more exact spacing by
dividing the page into
480
columns, each 1/6th of a character wide.
This type uses CHR$(27) and CHR$(16) followed by two other CHR$
numbers. These other numbers specify the column where printing
starts. The total number of columns is determined by adding the sec-
ond number to 256 times the first number. Our samples in Table 3-1
illustrate the command.
Table
3-1.
Dot spacing commands
Command
CHR$(27)CHR$(16)CHR$(0)CHR$(50)
CHR$(27)CHR$(16)CHR$(0)CHR$(186)
CHR$(27)CHR$(16)CHR$(1)CHR$(50)
Number of
columns
50( 0+ 50= 50)
186( 0+186=186)
306 (256 +
50 = 306)
The following program shows how the three commands in Table
3-l space the word “TAB” across the page.
NEW
10 OPEN3,4
20
FOR T=1 TO 3
30 READ X
40
Y=INT(X/256): Z=X-(Y*256)
50 PRINT#3,CHR$(27)CHR$(16)CHR$(Y);
60 PRINT#3,CHR$(Z)"TAB";
70 NEXT T
80 PRINT#3
90
CLOSE3
100 DATA 50,186,306
TAP TAB
TAB
22