61
Table 5-l
Line feed commands
Function Control code
Return print head to left margin CHR$( 13)
Advance paper one line CHR$(lO)
Reverse paper one line < ESC > CHR$( 10)
n Changing the line spacing
When you turn your printer on, the line spacing is set to 6
lines per inch. This is fine for most printing applications, but
when you want something different, the printer makes it easy
to set the line spacing to whatever you want.
Try this program to see how easy it is to change the line
spacing:
NEW
10
20
30
40
50
60
70
80
90
Demo of line spacing
FOR I=1 TO 25
IF I=13 THEN 60
LPRINT CHR$(27) ;“A”;CHR$(I);
LPRINT “THIS LINE SPACING IS SET TO”; I
NEXT I
LPRINT “LINE SPACING IS SET TO l/6 INCH (NORMAL).”
LPRINT CHR$ (27) ; “2”
END
Line 40 changes the line spacing. The command < ESC >
“A” CHR$(n) changes the line spacing to n/72 of an inch.
The loop that is started in line 20 increases the value of IE (the
variable I in this program) each time it is executed. So the line
spacing increases as the program continues. Line 30 just
shortcuts the loop when I = 13, since BASIC won’t let us send
CHR$(13) without adding an unwanted CHR$(lO) to it. Fi-
nally, the < ESC > “2” in line 80 resets the line spacing to 6
lines per inch. This is a shortcut that is the same as < ESC >
“A” CHR$( 12).