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)

nChanging 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 ’ Demo of line spacing

20 FOR I=1 TO 25

30 IF I=13 THEN 60

40 LPRINT CHR$(27) ;“A”;CHR$(I);

50 LPRINT “THIS LINE SPACING IS SET TO”; I

60 NEXT I

70 LPRINT “LINE SPACING IS SET TO l/6 INCH (NORMAL).”

80LPRINT CHR$ (27) ; “2”

90END

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).

Page 67
Image 67
Star Micronics NR-15, NR-10 user manual Lprint this Line Spacing is SET to Next