
Some of you fast students may have noticed that CHR$(69) is the same as “E”. That’s right, the program will work just as well if line 10 is changed like this:
10 LPRINT CHR$(27) "E";
That’s just another form of the same ASCII code, and it’s all the same to
Here’s another shortcut for BASIC programmers: since
<ESC > is used so often, assign it to a variable. In a long program, typing ESC$ is much easier than typing CHRS(27) each time! Now our program looks like this:
5 ESC$=CHR$(27)
10 LPRINT ESC$ "E";
Turn your printer off and back on now, or you will be printing in emphasized for quite a while!
nSome problem codes
Before we go too far we need to mention some codes that may cause you problems. Like most of the subjects in this chapter, we have to be a little vague because of the differences in com- puters. Nearly all BASICS change some of the ASCII codes between your BASIC program and your printer. Some turn CHR$( 10) (a line feed) into a CHR$( 13) (a carriage return) before sending it on. Some other problem codes are 0, 7, and 9 through 13.
COMMAND SYNTAX USED IN THIS MANUAL
Because
<ESC> "W" 1
31