The Chr$ Function; Printing From Basic - Epson FX-80 User Manual

Hide thumbs Also See for FX-80:
Table of Contents

Advertisement

The CHR$ function
The CHR$ function is designed to print special symbols on the
video display. It converts any decimal number from 0 through 255 to a
character (or action). What is printed is determined by the particular
modified ASCII table that is used by your computer system.
To check what you have, try printing a few characters on your com-
puter's screen. The usual format for this is PRINT CHR$(n). The 'n'
represents one of the numbers from 0 to 255, each one of which ac-
cesses a unique character or action. Try typing this:
1~
PRINT CHR$(65)
and RUN it. Since most computers use the numbers from 32 to 127 to
mean the same set of characters, you should see a capital A on the
screen.
It's the numbers less than 32 and greater than 127 that produce
different results on nearly every brand of computer. Try entering:
1~
PRINT CHR$(193)
and RUNning it. (What you see is what you get.) If you don't see
anything on the screen, don't worry. Remember that we are mainly
interested in sending that 193 to the printer, and what it prints on the
screen is of little consequence.
Printing from BASIC
Well then, how do you send the 193 (or any code) to the printer? To
do that, you need to find out how your system activates the printer.
The most typical methods are shown in Table 2-2.
23

Advertisement

Table of Contents
loading

Table of Contents