Sharp MZ-700 Series Owner's Manual page 80

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

2.5.3 ASC and CHR$
Format
Function
Example
ASC (x$)
x$: String expression
Returns the ASCII code for the first
character in string expression x$.
X=ASC (" A
11
)
Substitutes 65 (the ASCII code for the
letter A) into variable X.
Y = A S C C
1 1
S H A R P " )
Substitutes 83 (the ASCII code for S,
the first letter in the string " S H A R P " )
into variable X.
CHRS (x)
x: Numeric expression
Returns the letter whose ASCII code
corresponds to the value of numeric
expression X. (No character is
returned if the value specified for x is
less then 33; therefore, PRINT
1 1
_ "
or PRINT SPC (1) should be used to
obtain spaces, rather than CHR$ (32)).
A$=CHR$ (65)
Assigns A, the letter corresponding to
ASCII code 65, to string variable A$.
This function can be used to display
characters which cannot be entered
from the keyboard as follows.
PRINT CHR$ (107) J
This displays the graphic character EB.
Note: ASCII code is a standard code system which is frequently used with computers. This code uses
8 bit numbers to represent the letters of the alphabet, numerals, and symbols such as the dollar
sign and question mark. The full code set is presented in the table on page 154.
78-

Advertisement

Table of Contents
loading

Table of Contents