Star Micronics SR-10/I5 user manual Here is what you should get

Models: SR-10/I5

1 130
Download 130 pages 19.46 Kb
Page 47
Image 47
Here is what you should get:

I. c

: ..

,l@ ‘Demo italic and roman.

20

LPRINT CHR$(27) “4”

; ‘Italic on.

30

LPRINT "This line is

in ITALIC characters."

40

LPRINT CHR$(27) "5"

; 'Italic off.

5@ LPRINT "This line is

in ROMAN (normal) characters."

Here is what you should get:

This program is easy; line 20 turns italic on with < ESC > “4”, and line 40 turns it off with < ESC > “5”.

nUnderlining

Not only can SR- lo/ 15 print all styles ot printing in both roman and italic, but it can underline them too. The control codes are shown in Table 5-3.

 

Table

5-3

 

 

Underline commands

 

Function

Mode

Control

code

UnderlineON

STAR

<ESC>

“-” 1

 

IBM

<ESC>

“-” 1

UnderlineOFF

STAR

<ESC> “-? 0

 

[IBM

1<ESC>

“-” 0

Again, that’s simple. Let’s try it with this program:

10 'Demo underlining.

20 LPRINT CHR$(27) "-" CHR$(l) ; 'Underline on. 34)LPRINT "This phrase is UNDERLINED;" ;

40 LPRINT CHR$(27) "-" CHR$(@) ; 'Underline off. 50 LPRINT " this is not."

It should come out like this:

“/“h i CJ. phracs -is--LJNDEKLINEII; this is rick.

In this program underline is turned on in line 20 with < ESC > ‘L_ 97 CHR$(l), and then off in line 40 with < ESC > “ - ” CHR$(O). There’s a new little wrinkle in this program, though.

It all printed on one line. The semicolons at the end of the first three lines told BASIC that those lines were to be contin-

37

Page 47
Image 47
Star Micronics SR-10/I5 user manual Here is what you should get