L
i
L.
L
L
L
i
i
L
c.
L..
L
L
L.
L,
Creating YourOwn Characters | 85 |
printout test includes the characters with ASCII values from 160 to 254, but nothing prints. The (ESC) “*” CHR$(O) command copies only the standard ASCII characters (those in the range of 33 to 126) to download RAM; it does not copy any block graphics characters.
’ “#$%!GZ (1 t+! | ; .:::=:>?@AB~FGv |
;JKLMN~POK+TU~WXYZC\~~~.,_‘ab&defghi$klmnnp
qr stuvwx yr I ! 3.*
Figure T-12. Printout of the download character set, into which all the standard characters have been copied, and the C, D, H, and S have been changed.
To demonstrate how to use these characters, let’s use this character set to print a typical bridge hand. This program will do just that:
10 'Programto deal bridgehands and print on Delta
20 | GOSUB 1000 | 'Initializevariables |
30 | GOSUB 2000 | 'Initializeprinter |
40 | GOSUB 3000 | 'Dealcards |
50 | GOSUB 400pl | 'Printhands |
60 END
1000 'Initializevariables
1010 DEFINTA-Z
1020 DIM HAND(4),DECK(52),CARD$(13),SUIT$(3)
1030 CARD$(~)="2" : cm~$(2)=7~3” : cARD$(3)=~f41’: CARD$(lt)="5" : CARD$(5)="6"
1040 CARD$(6)="7" : CARD$(7)="8" : CARD$(8)="9" : CARD$(9)="10"
1050 CARD$(l@=" J" : CARD$(ll)="Q" : CARD$(12)=" K" : CARD$(13)="A"
186p SUIT$(@)="S": SUIT$(l)="H": SUIT$(2)="D": SUIT$(3)="C"
1070 INPUT "Randomnumberseed";1 1@8@ RANDOMIZEI
1090 RETURN
2000 'Initializeprinter
2010 LPRINTCHR$(27)CHR$(68)CHR$(20)CHR$(40) CHR$(0) 'Settabs
‘.
L