Chapter 7
If we really understand what we’re doing, the
140 GOSUB 20 : GOSUB 20 : PRINT
150 DATA 23, - 23,127,127, - 127,127
and RUN.
Now we are getting somewhere. Instead of trying to print the entire line in one shot, we hooked two print routines together with a semicolon. The first printed 23 columns, and the second printed 127 columns.
Really Long LinesSuppose we want to use even longer lines, up to the maximum of 480 columns. To specify a line length greater than 255, the last number in the <ESC>“K” Nl N2 sequence must be a 1. Instead of changing line 30, we can accommodate the entire range of line widths by adding:
25 IF N>255 THEN PRINT CHR$ (27) "K" CHR$
If the desired line width (N) is greater than 255, CHR$ (1) adds 256 columns, and CHR$
10 PRINT CHR$ (27) "A" CHR$ (7)
140 GOSUB 20 : PRINT
150 DATA
and RUN.
Figure
We don’t have to count the dots to check it. There are 60 dots per inch, so the line should be 5 inches long.
62