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 #65 background imageLoading...
Page #65 background image
Pieces
of
Strings
30
PRINT
A$
55
This
converts
the
single
number
12345
into
a
string
by
assigning
the
characters
12345 to A$
and
displays
the
string.
The
complementary
function to
STR$
is VA L.
V
AL
evaluates
the
numerical
characters
in
a
string:
10
DIM A$
(10)
20
A$ =
"123456"
30
A =
VAL(A$)
40
PRINT
A
This
displays
the
number
(123456'.
If
the
string
evaluated
contains
letters
as
well
as
numbers
then
only
the
numbers
which
appear
to
the
left of
all
the
letters
are
converted
by VA L.
This
means
that
'
PRINT
VAL(n123ABC45")
displays
(123'.
The
signs
+
and
-
may
appear
before
the
number
characters.
They
will
be
treated
by V
AL
as
the
sign
of
the
number.
If
the
first
characters
of
the
string
are
not
numeric
the
message
ERROR-18
is
displayed
by
the
Atari.
TESTING STRINGS
Strings
can
be
compared
wi
th
each
other
,in
the
same
way
as
numbers,
using
IF
...
THEN.
A
routine
like
this
one
can
be
used
to check
that
an
entry
is
suitable
for
the
program:
10
DIM
PW$(50)

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