EasyManuals Logo

Atari XL User Manual

Atari XL
262 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 #68 background imageLoading...
Page #68 background image
58
The
Afar;
XL
Handbook
The
characters
in
the
middle
of
the
string,
which
have
not
been
defined
by
any
of
your
commands,
turn
out
to be
hearts.
The
character
code of a
heart
is
zero,
and
the
memory
is
filled
with
zeros
when
the
Atari
is
switched
on.
The
facility
to
manipulate
strings
in
this
way
and
the
fact
that
a
string
may
hold
a
very
large
number
of
characters
allows
a
single
string
variable
to
be
used
in
a
similar
fashion
to a
numeric
array
variable.
An
"array"
or
ten
strings,
each
with
a
length
of20
characters
of less,
can
be
fitted
into
one
string
with
a
length
of 200
characters
by
allowing
20
character
positions
for
each
of
the
substrings.
The
substings
can
then
be
read
and
replaced
using
the
commands
outlined
above.
There
are
two
problems
in
using
strings
like
this.
The
first
is
that
the
string
is
initially
filled
with
hearts.
This
can
be overcome
by
filling
the
string
with
spaces
before
adding
any
data
to it:
10
DIM ARRAY$(200)
20
FOR
Z=1
TO
200
30
ARRAY$(Z)=""
40
NEXT
Z
The
second
problem
is
that
every
time
new
material
is
inserted
into
a
string,
the
position
of
the
end
of
the
main
string
is
reset
to
the
position
of
the
end
of
the
inserted
portion.
The
answer
to
this
is
to
wri
te
a
space
in
the
last
character
space
of
the
main
string
after
every
modification:
150
ARRAY$(140)="NEW STUFF"
160
ARRAY$(200)=""
There
are
one
or
two
other
point
to
watch
out
for.
Garbage
characters
maybe
left
behind
if
you
replace
an
element
with
a
shorter
string.
This
again
can
be
solved
by
writing
spaces
into
the

Questions and Answers:

Question and Answer IconNeed help?

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

Atari XL Specifications

General IconGeneral
Release Year1983
CPUMOS Technology 6502C
GraphicsANTIC, GTIA
SoundPOKEY (4 channels)
StorageCassette tape
PortsCartridge
Operating SystemAtari BASIC
CPU Speed1.79 MHz
RAM64 KB

Related product manuals