The Chr$ Function; Control Codes - Star Micronics Delta User Manual

Star micronics printer user's manual
Table of Contents

Advertisement

Getting Started With Delta
25
L
i
c
i
i
L
L
L
i
I,
.-
L
i
L
6
:
Welcome back. Let's try what we learned. Type the following:
NEW
18 LPRINT "TESTING"
RUN
Remember-we
use LPRINT, you may have to use something
else!
At any rate, you should have the word "TESTING"
on your
printer. Quite an achievement,
isn't it? Let's get done with this
simple stuff so that we can go on to something interesting.
The CHR$ function
We mentioned
CHR$ earlier as one way to express ASCII
codes. We are going to use it a lot in communicating
with Delta.
Delta uses many of the ASCII codes that don't represent letters
and numbers. The CHR$ function gives us an easy way to send
these codes to the printer. Try this to see how the CHR$ function
works:
NEW
18 LPRINT CHR$(68)
RUN
That should print a "D" for Delta. If you check the chart in
Appendix I you will see that 68 is the ASCII code for "D".
Control codes
Delta uses many of the non-printing ASCII codes for control
codes. These codes perform a function rather than printing a char-
acter. Let's try an easy one right now:
NEW
18 LPRINT CHR$(7)
RUN
L
Who made that noise? That's Delta's bell. We will learn more

Advertisement

Table of Contents
loading

Table of Contents