More Print Control Commands
30 NEXT N |
|
39 PR #0 | (Apple) |
and RUN.
OK gang. It’s different strokes for different folks. Users who can see their printer merrily printing numbers out to column 75 can give their computer a little pat on the - ah, keyboard.
Some
Apple II on the other hand does not tab correctly past column 40. To prove the point, Apple users change line 20 to:
20P R I N T T A B ( N ) ; N ;
and RUN.
It turns out that TABS in BASIC are designed for the 40 column Apple screen. TABS past the 40 column limit are treated as strings of blank spaces. There are 50 blank spaces between the 45 and 50. What’s this business about an Apple a day?
There are several ways around the problem. One is to TAB over with PRINT statements containing blanks between the quotes. A nicer way, (not available on the Apple II) is to use STRING$. See The BASIC Handbook for details.
The point of this program was to show that the
CHR$ (14) - ENTER DOUBLE WIDTH MODE CHR$ (20) - EXIT DOUBLE WIDTH MODE CHR$ (12)
PR# 1 - ENABLES PRINTER FROM APPLE BASIC PROGRAM PR# 0 - DISABLES PRINTER FROM APPLE BASIC PROGRAM PRINT CHR$ (4) “PR#l” - APPLE DISK ENABLES PRINTER PRINT CHR$ (4) “PR#0” - APPLE DISK DISABLES PRINTER CHR$ (27) “C” CHR$ (##) - ESTABLISHES FORM LENGTH
l <= ## <= 127
29