Star Micronics Radix User Manual page 71

Table of Contents

Advertisement

Controlling Radix With BASIC
57
followed by one or more CHR$ codes. As an example, the escape
code sequence to turn on italic print is:
(ESC) CHFt$(52)
In a program, this would look like this:
NEW
10 LPRINT 'X3$(27) CHRfi(52);
20 LPRINT "TESTING"
RUN
Try this program. It will print the word TESTING in italic.
Some of you fast students may have noticed that CHR$(52) is
the same as "4". That's right, the program will work just as well if
line
10
is changed like this:
10 LPRINT CHR$(27) "4";
That's just another form of the same ASCII code, and it's all
the same to Radix.
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 CHR$(27) each time! Now
our program looks like this:
5 ESC$=CHR$(27)
10 LPRINT ESC$ "4";
Turn your printer off and back on now, or you will be printing
in italic for quite a while!
Some 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 computers.

Advertisement

Table of Contents
loading

Table of Contents