In the program that follows, we’ve used this technique to create some large numbers. Each digit is actually made up of four

characters-two horizontally by two vertically. This means, of course, that you must define and print four characters for each finished digit. We assigned the upper left quadrant of each digit to ASCII codes from 160 to 169, the upper right quadrant to codes 170 to 179, and so on. Figure 9-14 shows how one digit is defined, and Figure 9- 15 shows the final output of our program.

Figure 9-14.Each digit is made up offourindividualcharacters.

0.223456789-

Figure9-15.The outputforcharacterslikethismustbecarefullyplanned. -

18 'Program to define and print numerals

241 'Each numeral is made up of 4 characters (2 wide x 2 high)

3p)OPEN "LPTl:" AS #l : WIDTH f/l,255

44)DOWN.CHAR.PROP$ = CHR$(27)+"pl"+CHR$(27)+"$1" 541NOT.DOWN.CHAR.PROP$ = CHR$(27)+"pfl"+CHR$(27)+"$@' 60 LINE.7$ = CHR$(27)+"1" : LINE.12$ = CHR$(27)+"2" 70 PRINT #l, CHR$(27) "61" CHR$(16@) CHR$(20@);

80 FOR I = 160 TO 200

100 READ M(d

110PRINT j/l,CHR$(MP));

120FOR S = 1 TO 11

-

-

98

Page 106
Image 106
Star Micronics SB-15 user manual 223456789