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 #66 background imageLoading...
Page #66 background image
56
20
30
40
The
Ater!
XL
Handbook
PRINT "WHAT'S
THE
PASSWORD";:
INPUT
PW$
IF
PW$
<>
"BEANS"
THEN
PRINT
"WRONG
!!!":GOTO
20
PRINT
As
well
as
testing
to
see
if
two
strings
are
the
same,
you
can
use
the
(greater
than'
(ยป
and
(less
than'
(
<)
tests
to
compare
strings.
10
IF
"B"
> "A"
THEN
PRINT "OK"
This
works
because
the
letters
are
stored
as
numbers.
The
computer
is
in
fact
comparing
the
ASCII
codes of
the
letters
in
the
strings.
This
is
very
useful
because
it
allows
strings
to be
sorted
into
alphabetical
order,
as
we
will
show
later
in
this
chapter.
STRING MANIPULATION
Atari
BASIC
differs
from
most
other
dialects
of
BASIC
in
the
way
in
which
strings
are
handled.
Characters
can
be copied from
strings,
and
can
be
inserted
into
strings
to
replace
some
of
the
characters
already
there.
To
illustrate
the
various
commands
we
will
use
a
string
A$
which
contains
the
first
10
letters
of
the
alphabet.
The
string
is
defined
by:
Position
1
2 3
4 5
6
7
8 9 10
Character
A
B
CDEFGH I
J
The
string
A$
DIM
A$(30)

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