EasyManuals Logo
Home>Atari>Desktop>800

Atari 800 Basic Reference Manual

Atari 800
122 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #45 background imageLoading...
Page #45 background image
ASC
CHR$
7
STRINGS
This
section
describes
strings
and
the
functions
as
sociated
with
string
handling.
Each
string
must
be
dimensioned
(see
DIM
statement,
Section
8)
and
each
string
variable
must
end
with
a $. A
string
itself
is
a
group
of
characters
"
strung"
together.
The
individual
characters
may
be
letters
,
numbers,
or
symbols
(including
the
Atari
special
keyboard
symbols.)
A
substring
is
a
part
of
a
longer
string
and
any
substring
is
accessible
in
Atari
BASIC
if
the
string
has
been
pro-
perly
dimensioned
(see
end
of
section).
The
characters
in
a
string
are
indexed
from
1
to
the
current
string
length,
which
is
less
than
or
equal
to
the
dimen-
sioned
length
of
the
string.
The
string
functions
described
in
this
section
are:
ASC
STR$
CHR$
VAL
LEN
Format:
ASC(sexp)
Examples:
100A
= ASC(A$)
This
function
returns
the
AT
ASCII
code
number
for
the
first
character
of
the
string
expression
(sexp).
This
function
can
be
used
in
either
Direct
or
Deferred
mode
.
figure
7-1
is
a
short
program
illustrating
the
ASC
function.
10
DH1
A$0::
3)
20
A:f.=
11
P
30
A=ASC(
A$)
40
PF.:H-H
A
Figure
7-1.
ASC
Function
Program
When
executed,
this
program
prints
a 69
which
is
the
AT
ASCII
code
for
the
let-
ter
"E".
Note
that
when
the
string
itself
is
u s
ed,
it
must
be
enclosed
in
quotation
marks.
Format:
CHR$ (a
exp)
Examples:
100
PRINT
CHR$ (65)
100
A$
= CHR$ (65)
This
character
string
function
returns
the
character,
in
string
format,
represented
by
the
A TASCII
code
number(s)
in
parenthes
e
s.
Only
one
c
ha
r
acter
is
returned.
In
the
above
examples,
the
letter
A is
returned.
Using
the
ASC
and
CHR$
functions,
the
following
program
prints
the
upper
ca
se
and
lower
case
let-
ters
of
the
alphabet.
Str-ings
37

Table of Contents

Other manuals for Atari 800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari 800 and is the answer not in the manual?

Atari 800 Specifications

General IconGeneral
BrandAtari
Model800
CategoryDesktop
LanguageEnglish

Related product manuals